#[non_exhaustive]pub struct OrderBookUpdate {
pub asks: Vec<BookLevel>,
pub bids: Vec<BookLevel>,
pub checksum: i64,
pub prev_seq_id: i64,
pub seq_id: i64,
pub ts: NumberString,
pub extra: ExtraFields,
}Expand description
An order book push from books, books5, or tick-by-tick book channels.
OKX docs: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-ws-order-book-channel
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.asks: Vec<BookLevel>Ask levels sorted from best (lowest) price to worst.
bids: Vec<BookLevel>Bid levels sorted from best (highest) price to worst.
checksum: i64CRC32 checksum of the top-25 bid/ask levels for integrity verification.
prev_seq_id: i64Sequence ID of the previous message; used to detect gaps.
Only applicable to books, books-l2-tbt, and books50-l2-tbt.
seq_id: i64Sequence ID of the current message; monotonically increasing.
ts: NumberStringOrder book generation time (Unix milliseconds).
extra: ExtraFieldsUnrecognized fields retained for forward compatibility.
Trait Implementations§
Source§impl Clone for OrderBookUpdate
impl Clone for OrderBookUpdate
Source§fn clone(&self) -> OrderBookUpdate
fn clone(&self) -> OrderBookUpdate
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 OrderBookUpdate
impl Debug for OrderBookUpdate
Source§impl Default for OrderBookUpdate
impl Default for OrderBookUpdate
Source§fn default() -> OrderBookUpdate
fn default() -> OrderBookUpdate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OrderBookUpdate
impl<'de> Deserialize<'de> for OrderBookUpdate
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 OrderBookUpdate
impl RefUnwindSafe for OrderBookUpdate
impl Send for OrderBookUpdate
impl Sync for OrderBookUpdate
impl Unpin for OrderBookUpdate
impl UnsafeUnpin for OrderBookUpdate
impl UnwindSafe for OrderBookUpdate
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