Struct crypto_rest_client::DydxSwapRestClient
source · [−]pub struct DydxSwapRestClient { /* private fields */ }
Expand description
dYdX perpetual RESTful client.
- REST API doc: https://docs.dydx.exchange/
- Trading at: https://trade.dydx.exchange/trade
- Rate Limits: https://docs.dydx.exchange/#rate-limits
- 100 requests per 10 seconds
Implementations
sourceimpl DydxSwapRestClient
impl DydxSwapRestClient
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 a Level2 orderbook snapshot.
All price levels are returned.
For example: https://api.dydx.exchange/v3/orderbook/BTC-USD
sourcepub fn fetch_open_interest() -> Result<String, Error>
pub fn fetch_open_interest() -> Result<String, Error>
Get open interest.
For example: https://api.dydx.exchange/v3/markets
Auto Trait Implementations
impl RefUnwindSafe for DydxSwapRestClient
impl Send for DydxSwapRestClient
impl Sync for DydxSwapRestClient
impl Unpin for DydxSwapRestClient
impl UnwindSafe for DydxSwapRestClient
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