pub struct Level1 { /* private fields */ }Expand description
Represents the level 1 market data of the order book
Implementations§
Source§impl Level1
impl Level1
Sourcepub fn last_trade_price(&self) -> Option<Price>
pub fn last_trade_price(&self) -> Option<Price>
Get the last trade price, None if no trade has occurred yet
Sourcepub fn best_bid_price(&self) -> Option<Price>
pub fn best_bid_price(&self) -> Option<Price>
Get the best bid price, if exists
Sourcepub fn best_ask_price(&self) -> Option<Price>
pub fn best_ask_price(&self) -> Option<Price>
Get the best ask price, if exists
Sourcepub fn best_bid_size(&self) -> Option<Quantity>
pub fn best_bid_size(&self) -> Option<Quantity>
Get the best bid size, if exists
Sourcepub fn best_ask_size(&self) -> Option<Quantity>
pub fn best_ask_size(&self) -> Option<Quantity>
Get the best ask size, if exists
Sourcepub fn micro_price(&self) -> Option<f64>
pub fn micro_price(&self) -> Option<f64>
Calculate the micro price, which weights the best bid and ask by the opposite side’s liquidity
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Level1
impl<'de> Deserialize<'de> for Level1
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
impl Eq for Level1
impl StructuralPartialEq for Level1
Auto Trait Implementations§
impl Freeze for Level1
impl RefUnwindSafe for Level1
impl Send for Level1
impl Sync for Level1
impl Unpin for Level1
impl UnsafeUnpin for Level1
impl UnwindSafe for Level1
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