Struct crypto_rest_client::ZbgSwapRestClient
source · [−]pub struct ZbgSwapRestClient { /* private fields */ }
Expand description
The RESTful client for ZBG swap markets.
- RESTful API doc: https://zbgapi.github.io/docs/future/v1/en/
- Trading at: https://futures.zbg.com/
Implementations
sourceimpl ZbgSwapRestClient
impl ZbgSwapRestClient
pub fn new(api_key: Option<String>, api_secret: Option<String>) -> Self
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 200 bids and asks are returned.
For example: https://www.zbg.com/exchange/api/v1/future/market/depth?symbol=BTC_USD-R&size=200
Auto Trait Implementations
impl RefUnwindSafe for ZbgSwapRestClient
impl Send for ZbgSwapRestClient
impl Sync for ZbgSwapRestClient
impl Unpin for ZbgSwapRestClient
impl UnwindSafe for ZbgSwapRestClient
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