pub struct BitmexWebSocket { /* private fields */ }Expand description
BitMEX WebSocket connector backed by UniversalWsTransport<BitmexProtocol>.
Implementations§
Trait Implementations§
Source§impl WebSocketConnector for BitmexWebSocket
impl WebSocketConnector for BitmexWebSocket
Source§fn connect<'life0, 'async_trait>(
&'life0 self,
_account_type: AccountType,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
_account_type: AccountType,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Подключиться к WebSocket
Source§fn disconnect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn disconnect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Отключиться от WebSocket
Source§fn connection_status(&self) -> ConnectionStatus
fn connection_status(&self) -> ConnectionStatus
Получить текущий статус подключения
Source§fn subscribe<'life0, 'async_trait>(
&'life0 self,
request: SubscriptionRequest,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn subscribe<'life0, 'async_trait>(
&'life0 self,
request: SubscriptionRequest,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Подписаться на поток данных
Source§fn unsubscribe<'life0, 'async_trait>(
&'life0 self,
request: SubscriptionRequest,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn unsubscribe<'life0, 'async_trait>(
&'life0 self,
request: SubscriptionRequest,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Отписаться от потока данных
Source§fn event_stream(
&self,
) -> Pin<Box<dyn Stream<Item = WebSocketResult<StreamEvent>> + Send>>
fn event_stream( &self, ) -> Pin<Box<dyn Stream<Item = WebSocketResult<StreamEvent>> + Send>>
Получить поток событий
Source§fn active_subscriptions(&self) -> Vec<SubscriptionRequest>
fn active_subscriptions(&self) -> Vec<SubscriptionRequest>
Получить список активных подписок
Source§fn ping_rtt_handle(&self) -> Option<Arc<TokioMutex<u64>>>
fn ping_rtt_handle(&self) -> Option<Arc<TokioMutex<u64>>>
Get a shared handle to the WS ping round-trip time (ms). Read more
Source§fn orderbook_capabilities(
&self,
_account_type: AccountType,
) -> OrderbookCapabilities
fn orderbook_capabilities( &self, _account_type: AccountType, ) -> OrderbookCapabilities
Returns the exchange’s L2/orderbook capabilities for the given account type. Read more
Source§fn has_subscription(&self, request: &SubscriptionRequest) -> bool
fn has_subscription(&self, request: &SubscriptionRequest) -> bool
Проверить наличие подписки
Auto Trait Implementations§
impl Freeze for BitmexWebSocket
impl !RefUnwindSafe for BitmexWebSocket
impl Send for BitmexWebSocket
impl Sync for BitmexWebSocket
impl Unpin for BitmexWebSocket
impl UnsafeUnpin for BitmexWebSocket
impl !UnwindSafe for BitmexWebSocket
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> WebSocketExt for Twhere
T: WebSocketConnector,
impl<T> WebSocketExt for Twhere
T: WebSocketConnector,
Source§fn subscribe_ticker<'life0, 'async_trait>(
&'life0 self,
symbol: String,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_ticker<'life0, 'async_trait>(
&'life0 self,
symbol: String,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Подписаться на тикер Read more
Source§fn subscribe_trades<'life0, 'async_trait>(
&'life0 self,
symbol: String,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_trades<'life0, 'async_trait>(
&'life0 self,
symbol: String,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Подписаться на сделки Read more
Source§fn subscribe_orderbook<'life0, 'async_trait>(
&'life0 self,
symbol: String,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_orderbook<'life0, 'async_trait>(
&'life0 self,
symbol: String,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Подписаться на стакан Read more
Source§fn subscribe_klines<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol: String,
interval: &'life1 str,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn subscribe_klines<'life0, 'life1, 'async_trait>(
&'life0 self,
symbol: String,
interval: &'life1 str,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Подписаться на свечи Read more
Source§fn subscribe_orders<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_orders<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Подписаться на обновления ордеров (private)
Source§fn subscribe_balance<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_balance<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Подписаться на обновления баланса (private)
Source§fn subscribe_positions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
fn subscribe_positions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = WebSocketResult<()>> + Send + 'async_trait>>where
Self: Sync + 'async_trait,
'life0: 'async_trait,
Подписаться на обновления позиций (private, futures)