#[non_exhaustive]pub struct SpreadTradeLeg {
pub inst_id: String,
pub px: NumberString,
pub sz: NumberString,
pub side: String,
pub fill_pnl: NumberString,
pub fee: NumberString,
pub sz_cont: NumberString,
pub fee_ccy: String,
pub trade_id: String,
pub extra: ExtraFields,
}Expand description
Leg execution nested in a spread trade.
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 of this leg, e.g., BTC-USDT.
px: NumberStringLeg fill price.
sz: NumberStringLeg fill size in base currency.
side: StringLeg side: buy or sell.
fill_pnl: NumberStringFill PnL for this leg (for closing fills; "" otherwise).
fee: NumberStringFee charged for this leg.
sz_cont: NumberStringLeg fill size in contracts.
fee_ccy: StringFee currency for this leg.
trade_id: StringTrade ID of this leg fill.
extra: ExtraFieldsUnrecognized fields retained for forward compatibility.
Trait Implementations§
Source§impl Clone for SpreadTradeLeg
impl Clone for SpreadTradeLeg
Source§fn clone(&self) -> SpreadTradeLeg
fn clone(&self) -> SpreadTradeLeg
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 SpreadTradeLeg
impl Debug for SpreadTradeLeg
Source§impl Default for SpreadTradeLeg
impl Default for SpreadTradeLeg
Source§fn default() -> SpreadTradeLeg
fn default() -> SpreadTradeLeg
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SpreadTradeLeg
impl<'de> Deserialize<'de> for SpreadTradeLeg
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 SpreadTradeLeg
impl RefUnwindSafe for SpreadTradeLeg
impl Send for SpreadTradeLeg
impl Sync for SpreadTradeLeg
impl Unpin for SpreadTradeLeg
impl UnsafeUnpin for SpreadTradeLeg
impl UnwindSafe for SpreadTradeLeg
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