Struct crypto_rest_client::MexcSwapRestClient
source · [−]pub struct MexcSwapRestClient { /* private fields */ }
Expand description
MEXC Swap market.
- REST API doc: https://mxcdevelop.github.io/APIDoc/
- Trading at: https://contract.mexc.com/exchange
Implementations
sourceimpl MexcSwapRestClient
impl MexcSwapRestClient
pub fn new(api_key: Option<String>, api_secret: Option<String>) -> Self
sourcepub fn fetch_trades(symbol: &str) -> Result<String, Error>
pub fn fetch_trades(symbol: &str) -> Result<String, Error>
Get most recent trades.
For example: https://contract.mexc.com/api/v1/contract/deals/BTC_USDT
sourcepub fn fetch_l2_snapshot(symbol: &str) -> Result<String, Error>
pub fn fetch_l2_snapshot(symbol: &str) -> Result<String, Error>
Get the latest Level2 snapshot of orderbook.
Top 2000 bids and asks will be returned.
For example: https://contract.mexc.com/api/v1/contract/depth/BTC_USDT?limit=2000
Rate limit: 20 times /2 seconds
Auto Trait Implementations
impl RefUnwindSafe for MexcSwapRestClient
impl Send for MexcSwapRestClient
impl Sync for MexcSwapRestClient
impl Unpin for MexcSwapRestClient
impl UnwindSafe for MexcSwapRestClient
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