pub enum WebsocketEvents {
Show 17 variants
OrderBookEvent(OrderBookUpdate),
RPIOrderBookEvent(RPIOrderbookUpdate),
TradeEvent(TradeUpdate),
TickerEvent(WsTicker),
LiquidationEvent(Liquidation),
AllLiquidationEvent(AllLiquidationUpdate),
KlineEvent(WsKline),
InsurancePoolEvent(InsurancePoolUpdate),
PriceLimitEvent(PriceLimitUpdate),
ADLAlertEvent(ADLAlertUpdate),
PositionEvent(PositionEvent),
ExecutionEvent(Execution),
OrderEvent(OrderEvent),
Wallet(WalletEvent),
TradeStream(TradeStreamEvent),
FastExecEvent(FastExecution),
SystemStatusEvent(SystemStatusUpdate),
}Expand description
Enum representing various WebSocket event types.
Encapsulates different types of WebSocket events, such as order book updates, trades, and position changes, received from Bybit’s WebSocket API. Bots use this to handle real-time market and account data for trading strategies.
Variants§
OrderBookEvent(OrderBookUpdate)
An order book update event.
Contains real-time updates to the order book for a trading pair. Bots use this for market depth analysis and liquidity monitoring.
RPIOrderBookEvent(RPIOrderbookUpdate)
An RPI (Real-time Price Improvement) order book update event.
Contains real-time updates to the RPI order book for a trading pair, including RPI sizes. RPI orders can provide price improvement for takers. Bots use this for market depth analysis with RPI information and improved liquidity monitoring.
TradeEvent(TradeUpdate)
A trade event.
Contains details of executed trades in the market. Bots use this for price discovery and trade signal generation.
TickerEvent(WsTicker)
A ticker event.
Contains real-time ticker data, such as last price and volume. Bots use this for monitoring market conditions and technical analysis.
LiquidationEvent(Liquidation)
A liquidation event.
Contains details of liquidation events in the market. Bots use this to assess market risk and volatility.
AllLiquidationEvent(AllLiquidationUpdate)
An all liquidation event.
Contains details of all liquidation events occurring across Bybit markets. This stream covers USDT contracts, USDC contracts, and inverse contracts. Bots use this for comprehensive market risk assessment and volatility monitoring.
KlineEvent(WsKline)
A kline (candlestick) event.
Contains real-time candlestick data for a trading pair. Bots use this for technical analysis and trend detection.
InsurancePoolEvent(InsurancePoolUpdate)
An insurance pool update event.
Contains real-time updates to insurance pool balances for various symbols. Insurance pools are used to cover losses when positions are liquidated below bankruptcy price. Bots use this to monitor exchange stability and counterparty risk.
PriceLimitEvent(PriceLimitUpdate)
A price limit update event.
Contains real-time updates to order price limits for trading symbols. These limits define the highest bid price (buyLmt) and lowest ask price (sellLmt) allowed. Bots use this for risk management and order validation.
ADLAlertEvent(ADLAlertUpdate)
An ADL (Auto-Deleveraging) alert update event.
Contains real-time ADL alert information for various trading pairs. ADL is a risk management mechanism that automatically closes positions when insurance pool balance reaches certain thresholds to prevent systemic risk. Bots use this to monitor market stability and potential forced liquidations.
PositionEvent(PositionEvent)
A position update event.
Contains updates to the account’s positions. Bots use this to track position changes and manage risk in real time.
ExecutionEvent(Execution)
An execution event.
Contains details of order executions for the account. Bots use this to confirm trade executions and update order status.
OrderEvent(OrderEvent)
An order update event.
Contains updates to the account’s orders. Bots use this to monitor order status and implement dynamic order management.
Wallet(WalletEvent)
A wallet update event.
Contains updates to the account’s wallet balance and margin. Bots use this to monitor account health and manage capital.
TradeStream(TradeStreamEvent)
A trade stream event.
Contains real-time trade stream data, typically for high-frequency trading. Bots use this for low-latency trade monitoring.
FastExecEvent(FastExecution)
A fast execution event.
Contains minimal execution data for low-latency processing. Bots use this for high-frequency trading and rapid execution confirmation.
SystemStatusEvent(SystemStatusUpdate)
A system status update event.
Contains real-time system status and maintenance information from Bybit. Bots use this to monitor platform health, maintenance schedules, and service incidents.
Trait Implementations§
Source§impl Clone for WebsocketEvents
impl Clone for WebsocketEvents
Source§fn clone(&self) -> WebsocketEvents
fn clone(&self) -> WebsocketEvents
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more