#[non_exhaustive]pub struct TickerUpdate {Show 17 fields
pub inst_type: String,
pub inst_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 vol_ccy24h: NumberString,
pub vol24h: NumberString,
pub sod_utc0: NumberString,
pub sod_utc8: NumberString,
pub ts: NumberString,
pub extra: ExtraFields,
}Expand description
tickers channel row.
OKX docs: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-ws-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.inst_type: StringInstrument type, e.g., SPOT, SWAP, FUTURES, OPTION.
inst_id: StringInstrument ID, e.g., BTC-USDT.
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 last 24 hours.
high24h: NumberStringHighest price over the last 24 hours.
low24h: NumberStringLowest price over the last 24 hours.
vol_ccy24h: NumberStringTrading volume in quote currency over the last 24 hours.
vol24h: NumberStringTrading volume in base currency (or contracts for derivatives) over the last 24 hours.
sod_utc0: NumberStringOpen price at the start of day (00:00 UTC).
sod_utc8: NumberStringOpen price at the start of day (08:00 UTC+8).
ts: NumberStringTicker push time (Unix milliseconds).
extra: ExtraFieldsUnrecognized fields retained for forward compatibility.
Trait Implementations§
Source§impl Clone for TickerUpdate
impl Clone for TickerUpdate
Source§fn clone(&self) -> TickerUpdate
fn clone(&self) -> TickerUpdate
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 TickerUpdate
impl Debug for TickerUpdate
Source§impl Default for TickerUpdate
impl Default for TickerUpdate
Source§fn default() -> TickerUpdate
fn default() -> TickerUpdate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TickerUpdate
impl<'de> Deserialize<'de> for TickerUpdate
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 TickerUpdate
impl RefUnwindSafe for TickerUpdate
impl Send for TickerUpdate
impl Sync for TickerUpdate
impl Unpin for TickerUpdate
impl UnsafeUnpin for TickerUpdate
impl UnwindSafe for TickerUpdate
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