Struct crypto_rest_client::BitmexRestClient
source · [−]pub struct BitmexRestClient { /* private fields */ }
Expand description
The REST client for BitMEX.
BitMEX has Swap and Future markets.
- REST API doc: https://www.bitmex.com/api/explorer/
- Trading at: https://www.bitmex.com/app/trade/
- Rate Limits: https://www.bitmex.com/app/restAPI#Limits
- 60 requests per minute on all routes (reduced to 30 when unauthenticated)
- 10 requests per second on certain routes (see below)
Implementations
sourceimpl BitmexRestClient
impl BitmexRestClient
pub fn new(api_key: Option<String>, api_secret: Option<String>) -> Self
sourcepub fn fetch_trades(
symbol: &str,
start_time: Option<String>
) -> Result<String, Error>
pub fn fetch_trades(
symbol: &str,
start_time: Option<String>
) -> Result<String, Error>
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
sourcepub fn fetch_l2_snapshot(symbol: &str) -> Result<String, Error>
pub fn fetch_l2_snapshot(symbol: &str) -> Result<String, Error>
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
impl RefUnwindSafe for BitmexRestClient
impl Send for BitmexRestClient
impl Sync for BitmexRestClient
impl Unpin for BitmexRestClient
impl UnwindSafe for BitmexRestClient
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more