pub struct DeribitTradeLeg {Show 14 fields
pub timestamp: i64,
pub price: Decimal,
pub amount: Decimal,
pub direction: String,
pub index_price: Option<Decimal>,
pub instrument_name: String,
pub trade_seq: i64,
pub mark_price: Option<Decimal>,
pub tick_direction: i32,
pub combo_id: String,
pub contracts: Option<Decimal>,
pub trade_id: String,
pub combo_trade_id: String,
pub iv: Option<Decimal>,
}Expand description
A single leg entry of a Deribit combo trade.
Appears in the legs array of a combo’s public trade message
(/public/get_last_trades_by_currency with kind=option_combo|future_combo,
and the trades.{combo}.{interval} subscription channel). Each leg is also
published independently on the leg instrument’s own trades.{instrument}.*
stream, carrying combo_id and combo_trade_id to link back to the parent.
Fields§
§timestamp: i64Trade timestamp in milliseconds.
price: DecimalTrade price.
amount: DecimalTrade amount.
direction: StringTrade direction: buy or sell.
index_price: Option<Decimal>Underlying index price at trade time (may be empty on older historical trades,
matching the optionality on the parent crate::http::models::DeribitPublicTrade).
instrument_name: StringLeg instrument name (e.g., BTC-PERPETUAL).
trade_seq: i64Per-instrument trade sequence number.
mark_price: Option<Decimal>Mark price at trade time (may be empty on older historical trades,
matching the optionality on the parent crate::http::models::DeribitPublicTrade).
tick_direction: i32Tick direction: 0 = Plus, 1 = Zero-Plus, 2 = Minus, 3 = Zero-Minus.
combo_id: StringThe combo instrument that produced this leg.
contracts: Option<Decimal>Trade size in contract units (may be absent on historical combo trades,
matching the optionality on the parent crate::http::models::DeribitPublicTrade).
trade_id: StringUnique (per currency) trade identifier for the leg.
combo_trade_id: StringTrade identifier of the parent combo trade.
iv: Option<Decimal>Implied volatility (option legs only).
Trait Implementations§
Source§impl Clone for DeribitTradeLeg
impl Clone for DeribitTradeLeg
Source§fn clone(&self) -> DeribitTradeLeg
fn clone(&self) -> DeribitTradeLeg
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DeribitTradeLeg
impl Debug for DeribitTradeLeg
Source§impl<'de> Deserialize<'de> for DeribitTradeLeg
impl<'de> Deserialize<'de> for DeribitTradeLeg
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>,
Auto Trait Implementations§
impl Freeze for DeribitTradeLeg
impl RefUnwindSafe for DeribitTradeLeg
impl Send for DeribitTradeLeg
impl Sync for DeribitTradeLeg
impl Unpin for DeribitTradeLeg
impl UnsafeUnpin for DeribitTradeLeg
impl UnwindSafe for DeribitTradeLeg
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more