pub struct TradeRecord {
pub timestamp_exchange: u64,
pub timestamp_system: u64,
pub symbol: String,
pub exchange: String,
pub price: Decimal,
pub quantity: Decimal,
pub side: TradeSide,
pub trade_id: String,
pub buyer_order_id: Option<String>,
pub seller_order_id: Option<String>,
pub sequence: u64,
}Expand description
High-level trade data structure for easier manipulation
Represents a single trade transaction with all relevant metadata.
This structure is optimized for serialization and uses SmartString for performance.
Fields§
§timestamp_exchange: u64Timestamp when the trade occurred at the exchange (nanoseconds since epoch)
timestamp_system: u64Timestamp when the trade was processed by our system (nanoseconds since epoch)
symbol: StringTrading pair symbol (e.g., “BTCUSDT”)
exchange: StringExchange identifier (e.g., “binance”, “coinbase”)
price: DecimalTrade execution price using high-precision decimal arithmetic
quantity: DecimalTrade quantity/volume using high-precision decimal arithmetic
side: TradeSideSide of the trade (buy or sell)
trade_id: StringUnique identifier for this trade from the exchange
buyer_order_id: Option<String>Optional order ID of the buyer (if available from exchange)
seller_order_id: Option<String>Optional order ID of the seller (if available from exchange)
sequence: u64Sequence number for ordering trades chronologically
Trait Implementations§
Source§impl Clone for TradeRecord
impl Clone for TradeRecord
Source§fn clone(&self) -> TradeRecord
fn clone(&self) -> TradeRecord
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source. Read more