pub struct OrderBookUpdate {
pub topic: String,
pub event_type: String,
pub timestamp: u64,
pub data: WsOrderBook,
pub cts: u64,
}Expand description
Structure for WebSocket order book update events.
Contains real-time updates to the order book for a trading pair, including bids, asks, and sequence numbers. Bots use this for market depth analysis and liquidity monitoring in perpetual futures trading.
Fields§
§topic: StringThe WebSocket topic for the event (e.g., “orderbook.50.BTCUSDT”).
Specifies the data stream for the order book update, including depth and symbol. Bots use this to verify the correct market and depth level.
event_type: StringThe event type (e.g., “snapshot”, “delta”).
Indicates whether the update is a full snapshot or incremental delta. Bots use this to initialize or update their order book state.
timestamp: u64The timestamp of the event in milliseconds.
Indicates when the order book update was generated. Bots use this to ensure data freshness and align with other market data.
data: WsOrderBookThe order book data.
Contains the bids, asks, and sequence numbers for the order book. Bots use this to update their internal order book representation.
cts: u64The creation timestamp in milliseconds.
Indicates when the order book update was created by Bybit’s server. Bots use this to measure latency and ensure data consistency.
Trait Implementations§
Source§impl Clone for OrderBookUpdate
impl Clone for OrderBookUpdate
Source§fn clone(&self) -> OrderBookUpdate
fn clone(&self) -> OrderBookUpdate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more