pub enum MarketDataEvent {
Ticker {
exchange: Exchange,
symbol: Symbol,
tick: Tick,
},
Candle {
exchange: Exchange,
symbol: Symbol,
candle: Candle,
},
Trade {
exchange: Exchange,
symbol: Symbol,
side: Side,
price: f64,
size: f64,
timestamp: DateTime<Utc>,
},
}Expand description
A normalized market-data event that can come from any exchange.
Exchange adapters parse their native formats into this enum so the downstream brain and risk layers are exchange-agnostic.
Variants§
Ticker
Best-bid/best-ask update.
Fields
Candle
A completed candle (fully closed bar).
Fields
Trade
An individual trade print.
Implementations§
Trait Implementations§
Source§impl Clone for MarketDataEvent
impl Clone for MarketDataEvent
Source§fn clone(&self) -> MarketDataEvent
fn clone(&self) -> MarketDataEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MarketDataEvent
impl Debug for MarketDataEvent
Source§impl<'de> Deserialize<'de> for MarketDataEvent
impl<'de> Deserialize<'de> for MarketDataEvent
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
Auto Trait Implementations§
impl Freeze for MarketDataEvent
impl RefUnwindSafe for MarketDataEvent
impl Send for MarketDataEvent
impl Sync for MarketDataEvent
impl Unpin for MarketDataEvent
impl UnsafeUnpin for MarketDataEvent
impl UnwindSafe for MarketDataEvent
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