#[non_exhaustive]pub struct OptionTradeUpdate {Show 13 fields
pub inst_id: String,
pub inst_family: String,
pub trade_id: String,
pub px: NumberString,
pub sz: NumberString,
pub side: String,
pub opt_type: String,
pub fill_vol: NumberString,
pub fwd_px: NumberString,
pub idx_px: NumberString,
pub mark_px: NumberString,
pub ts: NumberString,
pub extra: ExtraFields,
}Expand description
option-trades channel row.
OKX docs: https://www.okx.com/docs-v5/en/#order-book-trading-market-data-ws-option-trades-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_id: StringInstrument ID, e.g., BTC-USD-240329-40000-C.
inst_family: StringInstrument family, e.g., BTC-USD.
trade_id: StringTrade ID assigned by OKX.
px: NumberStringTrade price.
sz: NumberStringTrade size (number of contracts).
side: StringTrade side: buy or sell.
opt_type: StringOption type: C (call) or P (put).
fill_vol: NumberStringImplied volatility at the fill price.
fwd_px: NumberStringForward price at the time of the trade.
idx_px: NumberStringIndex price at the time of the trade.
mark_px: NumberStringMark price at the time of the trade.
ts: NumberStringTrade timestamp (Unix milliseconds).
extra: ExtraFieldsUnrecognized fields retained for forward compatibility.
Trait Implementations§
Source§impl Clone for OptionTradeUpdate
impl Clone for OptionTradeUpdate
Source§fn clone(&self) -> OptionTradeUpdate
fn clone(&self) -> OptionTradeUpdate
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 OptionTradeUpdate
impl Debug for OptionTradeUpdate
Source§impl Default for OptionTradeUpdate
impl Default for OptionTradeUpdate
Source§fn default() -> OptionTradeUpdate
fn default() -> OptionTradeUpdate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OptionTradeUpdate
impl<'de> Deserialize<'de> for OptionTradeUpdate
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 OptionTradeUpdate
impl RefUnwindSafe for OptionTradeUpdate
impl Send for OptionTradeUpdate
impl Sync for OptionTradeUpdate
impl Unpin for OptionTradeUpdate
impl UnsafeUnpin for OptionTradeUpdate
impl UnwindSafe for OptionTradeUpdate
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