pub struct TradeUpdate {
pub topic: String,
pub event_type: String,
pub timestamp: u64,
pub data: Vec<WsTrade>,
}Expand description
Structure for WebSocket trade update events.
Contains real-time updates on executed trades for a trading pair. Bots use this for price discovery, trade signal generation, and market momentum analysis in perpetual futures trading.
Fields§
§topic: StringThe WebSocket topic for the event (e.g., “trade.BTCUSDT”).
Specifies the data stream for the trade update. Bots use this to verify the correct market.
event_type: StringThe event type (e.g., “snapshot”).
Indicates the type of trade update, typically a snapshot of recent trades. Bots use this to process trade data appropriately.
timestamp: u64The timestamp of the event in milliseconds.
Indicates when the trade update was generated. Bots use this to ensure data freshness and align with other market data.
data: Vec<WsTrade>A list of trade details.
Contains the executed trades, including price, volume, and side. Bots use this to analyze market activity and generate trading signals.
Trait Implementations§
Source§impl Clone for TradeUpdate
impl Clone for TradeUpdate
Source§fn clone(&self) -> TradeUpdate
fn clone(&self) -> TradeUpdate
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more