pub struct RecentTrade {
pub time: u64,
pub symbol: String,
pub price: f64,
pub size: f64,
pub side: Side,
pub exec_id: String,
pub is_block_trade: bool,
pub is_rpi_trade: bool,
}Expand description
Represents a single trade record.
Each trade record details an executed trade, including price, quantity, side, and timestamp. For perpetual futures, this data is critical for understanding short-term market dynamics and confirming trading signals.
Fields§
§time: u64The timestamp of the trade execution (Unix timestamp in milliseconds).
Indicates when the trade occurred. Bots use this to align trade data with other time-series data (e.g., Klines) and to assess the recency of market activity for real-time strategies.
symbol: StringThe trading pair symbol (e.g., “BTCUSDT”).
Identifies the perpetual futures contract for the trade. Bots should verify this matches the requested symbol to ensure data accuracy.
price: f64The trade execution price.
The price at which the trade was executed. Bots use this to track price movements and calculate metrics like average trade price or slippage in perpetual futures. Stored as a string to preserve precision, so bots must parse it to f64 for calculations.
size: f64The trade quantity (in base asset).
The amount of the base asset traded (e.g., BTC in BTCUSDT). Bots use this to assess trade size and market liquidity, as large trades may indicate institutional activity or strong market sentiment.
side: SideThe side of the trade (“Buy” or “Sell”).
Indicates whether the trade was a buy (taker buying from maker) or sell (taker selling to maker). Bots use this to analyze buying vs. selling pressure, which can inform momentum-based strategies in perpetual futures.
exec_id: StringThe unique trade ID.
A unique identifier for the trade on Bybit’s exchange. Bots can use this to track specific trades, avoid duplicates in data processing, or correlate trades with other exchange data.
is_block_trade: boolIndicates if the trade is a block trade.
A boolean (true or false) indicating whether the trade was a large block trade, typically executed off the public order book. Bots can use this to identify significant market moves driven by institutional or large traders in perpetual futures.
is_rpi_trade: boolTrait Implementations§
Source§impl Clone for RecentTrade
impl Clone for RecentTrade
Source§fn clone(&self) -> RecentTrade
fn clone(&self) -> RecentTrade
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more