Crate cryptomkt

Source
Expand description

cryptomkt-rs provides a simple and powerful implementation for CryptoMarket API.

Example where the last ticker is shown for each market available in the exchange market Criptomarket

extern crate cryptomkt;
use cryptomkt::{CryptoMktClient, OrderType};

const API_KEY: &'static str = "<API_KEY>";
const API_SECRET: &'static str = "<API SECRET>";

fn main() {

    let client = CryptoMktClient::new(API_KEY, API_SECRET);

    // Get the markets available in the exchange
    let markets = client.get_markets();
    for m in markets.iter() {
        println!("{}", m.get_name());

        // GET current Ticker
        match m.get_current_ticker() {
            Ok(ticker) => {
                println!("{:?}", ticker);
            }
            Err(e) => {
                println!("{:?}", e);
            }
        }
    }
}

Modules§

models
response
En este módulo se encuentra las diferentes respuestas dada por el servidor para los diferentes endpoints

Structs§

CryptoMktApi
Cryptomkt API
CryptoMktClient
CryptoMkt Client
Market
Market

Enums§

OrderType
Order Type
RequestMethod
HTTP methods supported by the API