#[non_exhaustive]pub struct SpreadTickerUpdate {Show 13 fields
pub sprd_id: String,
pub last: NumberString,
pub last_sz: NumberString,
pub ask_px: NumberString,
pub ask_sz: NumberString,
pub bid_px: NumberString,
pub bid_sz: NumberString,
pub open24h: NumberString,
pub high24h: NumberString,
pub low24h: NumberString,
pub vol24h: NumberString,
pub ts: NumberString,
pub extra: ExtraFields,
}Expand description
sprd-tickers channel row.
OKX docs: https://www.okx.com/docs-v5/en/#spread-trading-websocket-sprd-tickers-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.sprd_id: StringSpread ID, e.g., BTC-USDT_BTC-USDT-SWAP.
last: NumberStringLast traded price.
last_sz: NumberStringLast traded size.
ask_px: NumberStringBest ask price.
ask_sz: NumberStringBest ask size.
bid_px: NumberStringBest bid price.
bid_sz: NumberStringBest bid size.
open24h: NumberStringOpen price over the past 24 hours.
high24h: NumberStringHighest price over the past 24 hours.
low24h: NumberStringLowest price over the past 24 hours.
vol24h: NumberString24-hour trading volume in base currency (spot-USDT spreads) or USD (coin-margined spreads).
ts: NumberStringTicker data generation time (Unix milliseconds).
extra: ExtraFieldsUnrecognized fields retained for forward compatibility.
Trait Implementations§
Source§impl Clone for SpreadTickerUpdate
impl Clone for SpreadTickerUpdate
Source§fn clone(&self) -> SpreadTickerUpdate
fn clone(&self) -> SpreadTickerUpdate
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 SpreadTickerUpdate
impl Debug for SpreadTickerUpdate
Source§impl Default for SpreadTickerUpdate
impl Default for SpreadTickerUpdate
Source§fn default() -> SpreadTickerUpdate
fn default() -> SpreadTickerUpdate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SpreadTickerUpdate
impl<'de> Deserialize<'de> for SpreadTickerUpdate
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 SpreadTickerUpdate
impl RefUnwindSafe for SpreadTickerUpdate
impl Send for SpreadTickerUpdate
impl Sync for SpreadTickerUpdate
impl Unpin for SpreadTickerUpdate
impl UnsafeUnpin for SpreadTickerUpdate
impl UnwindSafe for SpreadTickerUpdate
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