Struct crypto_rest_client::BitmexRestClient[][src]

pub struct BitmexRestClient { /* fields omitted */ }

The REST client for BitMEX.

BitMEX has Swap and Future markets.

Implementations

impl BitmexRestClient[src]

pub fn new(api_key: Option<String>, api_secret: Option<String>) -> Self[src]

pub fn fetch_trades(
    symbol: &str,
    start_time: Option<String>
) -> Result<String, Error>
[src]

Get trades from a beginning time.

Equivalent to /trade with count=1000

For example: https://www.bitmex.com/api/v1/trade?symbol=XBTUSD&count=1000&startTime=2018-09-28T12:34:25.706Z

pub fn fetch_l2_snapshot(symbol: &str) -> Result<String, Error>[src]

Get a full Level2 snapshot of orderbook.

Equivalent to /orderBook/L2 with depth=0

For example: https://www.bitmex.com/api/v1/orderBook/L2?symbol=XBTUSD&depth=0

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.