#[non_exhaustive]pub struct SpreadTradeUpdate {Show 15 fields
pub sprd_id: String,
pub trade_id: String,
pub ord_id: String,
pub cl_ord_id: String,
pub tag: String,
pub fill_px: NumberString,
pub fill_sz: NumberString,
pub side: String,
pub state: String,
pub exec_type: String,
pub ts: NumberString,
pub legs: Vec<SpreadTradeLeg>,
pub code: String,
pub msg: String,
pub extra: ExtraFields,
}Expand description
Private/public spread-trade channel row.
OKX docs: https://www.okx.com/docs-v5/en/#spread-trading-websocket-sprd-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.sprd_id: StringSpread ID, e.g., BTC-USDT_BTC-USDT-SWAP.
trade_id: StringTrade ID assigned by OKX.
ord_id: StringOKX-assigned order ID.
cl_ord_id: StringClient-supplied order ID.
tag: StringOrder tag.
fill_px: NumberStringFill price of this trade.
fill_sz: NumberStringFill size of this trade.
side: StringTrade side: buy or sell.
state: StringTrade state: filled or rejected.
exec_type: StringLiquidity role of this fill: T (taker) or M (maker).
ts: NumberStringTrade timestamp (Unix milliseconds).
legs: Vec<SpreadTradeLeg>Per-leg execution details for this trade.
code: StringError code; "0" on success.
msg: StringError message; empty on success.
extra: ExtraFieldsUnrecognized fields retained for forward compatibility.
Trait Implementations§
Source§impl Clone for SpreadTradeUpdate
impl Clone for SpreadTradeUpdate
Source§fn clone(&self) -> SpreadTradeUpdate
fn clone(&self) -> SpreadTradeUpdate
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 SpreadTradeUpdate
impl Debug for SpreadTradeUpdate
Source§impl Default for SpreadTradeUpdate
impl Default for SpreadTradeUpdate
Source§fn default() -> SpreadTradeUpdate
fn default() -> SpreadTradeUpdate
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SpreadTradeUpdate
impl<'de> Deserialize<'de> for SpreadTradeUpdate
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 SpreadTradeUpdate
impl RefUnwindSafe for SpreadTradeUpdate
impl Send for SpreadTradeUpdate
impl Sync for SpreadTradeUpdate
impl Unpin for SpreadTradeUpdate
impl UnsafeUnpin for SpreadTradeUpdate
impl UnwindSafe for SpreadTradeUpdate
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