crypto-rest-client 1.0.1

An RESTful client for all cryptocurrency exchanges.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use crypto_market_type::MarketType;
use crypto_rest_client::{fetch_l2_snapshot, BitmexRestClient};

#[test]
fn test_trades() {
    let text = BitmexRestClient::fetch_trades("XBTUSD", None).unwrap();
    assert!(text.starts_with("[{"));
}

#[test]
fn test_l2_snapshot() {
    let text = fetch_l2_snapshot("bitmex", MarketType::InverseSwap, "XBTUSD", Some(3)).unwrap();
    assert!(text.starts_with("[{"));
}