pub struct OrderbookStats {
pub exchange_ts: Option<DateTime<Utc>>,
pub openpx_ts: DateTime<Utc>,
pub asset_id: String,
pub best_bid: Option<f64>,
pub best_ask: Option<f64>,
pub mid: Option<f64>,
pub spread_bps: Option<f64>,
pub weighted_mid: Option<f64>,
pub imbalance: Option<f64>,
pub bid_depth: f64,
pub ask_depth: f64,
}Expand description
Top-of-book snapshot stats for one asset.
Fields§
§exchange_ts: Option<DateTime<Utc>>Upstream snapshot time in UTC; null when not provided.
openpx_ts: DateTime<Utc>Wall-clock time OpenPX served the response (UTC).
asset_id: StringOrderable asset id (e.g. "KXBTCD-25APR1517").
best_bid: Option<f64>Best bid as YES probability (e.g. 0.61).
best_ask: Option<f64>Best ask as YES probability (e.g. 0.63).
mid: Option<f64>Mid price as YES probability (e.g. 0.62).
spread_bps: Option<f64>Spread in basis points relative to mid (e.g. 400.0).
weighted_mid: Option<f64>Size-weighted mid using the top-10 levels (e.g. 0.62).
imbalance: Option<f64>Top-10 imbalance in [-1, 1] (positive = bid-heavy) (e.g. 0.12).
bid_depth: f64Total resting bid size in contracts (e.g. 1000.0).
ask_depth: f64Total resting ask size in contracts (e.g. 1000.0).
Trait Implementations§
Source§impl Clone for OrderbookStats
impl Clone for OrderbookStats
Source§fn clone(&self) -> OrderbookStats
fn clone(&self) -> OrderbookStats
Returns a duplicate of the value. Read more
1.0.0 · 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 OrderbookStats
impl Debug for OrderbookStats
Source§impl<'de> Deserialize<'de> for OrderbookStats
impl<'de> Deserialize<'de> for OrderbookStats
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 OrderbookStats
impl RefUnwindSafe for OrderbookStats
impl Send for OrderbookStats
impl Sync for OrderbookStats
impl Unpin for OrderbookStats
impl UnsafeUnpin for OrderbookStats
impl UnwindSafe for OrderbookStats
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