pub struct OrderbookDataMsg {
pub symbol: String,
pub bids: Vec<OrderbookLevel>,
pub asks: Vec<OrderbookLevel>,
pub update_id: i64,
pub seq: i64,
}Fields§
§symbol: StringSymbol name
bids: Vec<OrderbookLevel>Bid, buy side. For snapshot, sorted by price in descending order. For delta, size 0 means delete the price level
asks: Vec<OrderbookLevel>Ask, sell side. For snapshot, sorted by price in ascending order. For delta, size 0 means delete the price level
update_id: i64Update ID, is a sequence. Occasionally, you’ll receive “u”=1, which is a snapshot data due to the restart of the websocket service. So please overwrite your local orderbook
seq: i64Cross sequence. You can use this field to compare different levels orderbook data, and for the smaller seq, then it means the data is generated earlier
Trait Implementations§
Source§impl Debug for OrderbookDataMsg
impl Debug for OrderbookDataMsg
Source§impl<'de> Deserialize<'de> for OrderbookDataMsg
impl<'de> Deserialize<'de> for OrderbookDataMsg
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 PartialEq for OrderbookDataMsg
impl PartialEq for OrderbookDataMsg
Source§fn eq(&self, other: &OrderbookDataMsg) -> bool
fn eq(&self, other: &OrderbookDataMsg) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for OrderbookDataMsg
Auto Trait Implementations§
impl Freeze for OrderbookDataMsg
impl RefUnwindSafe for OrderbookDataMsg
impl Send for OrderbookDataMsg
impl Sync for OrderbookDataMsg
impl Unpin for OrderbookDataMsg
impl UnsafeUnpin for OrderbookDataMsg
impl UnwindSafe for OrderbookDataMsg
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