pub struct ZbgSwapWSClient { /* private fields */ }Expand description
The WebSocket client for ZBG swap market.
- WebSocket API doc: https://www.zbgpro.com/docs/future/v1/cn/#300f34d976, there is no English doc
- Trading at: https://futures.zbg.com/
Implementations§
Trait Implementations§
Source§impl WSClient for ZbgSwapWSClient
impl WSClient for ZbgSwapWSClient
Source§fn subscribe_trade<'life0, 'life1, 'async_trait>(
&'life0 self,
symbols: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe_trade<'life0, 'life1, 'async_trait>(
&'life0 self,
symbols: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribes to trade channels. Read more
Source§fn subscribe_orderbook<'life0, 'life1, 'async_trait>(
&'life0 self,
symbols: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe_orderbook<'life0, 'life1, 'async_trait>(
&'life0 self,
symbols: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribes to incremental level2 orderbook channels. Read more
Source§fn subscribe_orderbook_topk<'life0, 'life1, 'async_trait>(
&'life0 self,
symbols: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe_orderbook_topk<'life0, 'life1, 'async_trait>(
&'life0 self,
symbols: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribes to level2 orderbook snapshot channels. Read more
Source§fn subscribe_l3_orderbook<'life0, 'life1, 'async_trait>(
&'life0 self,
symbols: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe_l3_orderbook<'life0, 'life1, 'async_trait>(
&'life0 self,
symbols: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribes to level3 orderebook channels. Read more
Source§fn subscribe_ticker<'life0, 'life1, 'async_trait>(
&'life0 self,
symbols: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe_ticker<'life0, 'life1, 'async_trait>(
&'life0 self,
symbols: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribes to ticker channels. Read more
Source§fn subscribe_bbo<'life0, 'life1, 'async_trait>(
&'life0 self,
symbols: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe_bbo<'life0, 'life1, 'async_trait>(
&'life0 self,
symbols: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribes to BBO(best bid & offer) channels. Read more
Source§fn subscribe_candlestick<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol_interval_list: &'life1 [(String, usize)],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe_candlestick<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol_interval_list: &'life1 [(String, usize)],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribes to candlestick channels. Read more
Source§fn subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
topics: &'life1 [(String, String)],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
topics: &'life1 [(String, String)],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Subscribe to multiple topics. Read more
Source§fn unsubscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
topics: &'life1 [(String, String)],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn unsubscribe<'life0, 'life1, 'async_trait>(
&'life0 self,
topics: &'life1 [(String, String)],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Unsubscribes multiple topics. Read more
Source§fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
commands: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn send<'life0, 'life1, 'async_trait>(
&'life0 self,
commands: &'life1 [String],
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Send raw JSON commands. Read more
Auto Trait Implementations§
impl !Freeze for ZbgSwapWSClient
impl RefUnwindSafe for ZbgSwapWSClient
impl Send for ZbgSwapWSClient
impl Sync for ZbgSwapWSClient
impl Unpin for ZbgSwapWSClient
impl UnwindSafe for ZbgSwapWSClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more