Struct crypto_message::compact::TradeMsg
source · pub struct TradeMsg {
pub exchange: Exchange,
pub market_type: MarketType,
pub msg_type: MessageType,
pub symbol: u64,
pub timestamp: i64,
pub side: TradeSide,
pub price: f64,
pub quantity: f64,
}Expand description
Realtime trade message.
Fields§
§exchange: ExchangeThe exchange name, unique for each exchage
market_type: MarketTypeMarket type
msg_type: MessageTypeMessage type
symbol: u64Exchange-specific trading symbol or id, recognized by RESTful API
timestamp: i64Unix timestamp, in milliseconds
side: TradeSideWhich side is taker
price: f64price
quantity: f64quantity, comes from one of quantity_base, quantity_quote and quantity_contract.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for TradeMsg
impl<'de> Deserialize<'de> for TradeMsg
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Ord for TradeMsg
impl Ord for TradeMsg
source§impl PartialEq for TradeMsg
impl PartialEq for TradeMsg
source§impl PartialOrd for TradeMsg
impl PartialOrd for TradeMsg
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for TradeMsg
Auto Trait Implementations§
impl Freeze for TradeMsg
impl RefUnwindSafe for TradeMsg
impl Send for TradeMsg
impl Sync for TradeMsg
impl Unpin for TradeMsg
impl UnwindSafe for TradeMsg
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more