pub struct Orderbook {
pub symbol: String,
pub bids: Vec<OrderbookLevel>,
pub asks: Vec<OrderbookLevel>,
pub ts: Timestamp,
pub update_id: i64,
pub seq: i64,
pub cts: Option<Timestamp>,
}Fields§
§symbol: StringSymbol name
bids: Vec<OrderbookLevel>Bid, buy side. Sorted by price in descending order
asks: Vec<OrderbookLevel>Ask, sell side. Sorted by price in ascending order
ts: TimestampThe timestamp (ms) that the system generates the data
update_id: i64Update ID, is a sequence. Occasionally, you’ll receive “u”=1, which is a snapshot data due to the restart of the 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
cts: Option<Timestamp>Cross timestamp (ms). Spot only
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Orderbook
impl<'de> Deserialize<'de> for Orderbook
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 StructuralPartialEq for Orderbook
Auto Trait Implementations§
impl Freeze for Orderbook
impl RefUnwindSafe for Orderbook
impl Send for Orderbook
impl Sync for Orderbook
impl Unpin for Orderbook
impl UnsafeUnpin for Orderbook
impl UnwindSafe for Orderbook
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