pub struct DeribitUserTradeMsg {Show 20 fields
pub trade_id: String,
pub order_id: String,
pub instrument_name: Ustr,
pub direction: String,
pub price: Decimal,
pub amount: Decimal,
pub fee: Decimal,
pub fee_currency: String,
pub timestamp: u64,
pub trade_seq: u64,
pub liquidity: String,
pub order_type: String,
pub index_price: Decimal,
pub mark_price: Decimal,
pub tick_direction: i8,
pub state: String,
pub label: Option<String>,
pub reduce_only: bool,
pub post_only: bool,
pub profit_loss: Option<Decimal>,
}Expand description
User trade message from Deribit.
Received from order responses and user.trades subscription.
Fields§
§trade_id: StringUnique trade ID.
order_id: StringAssociated order ID.
instrument_name: UstrInstrument name.
direction: StringTrade direction: “buy” or “sell”.
price: DecimalExecution price.
amount: DecimalTrade amount in contracts.
fee: DecimalFee amount.
fee_currency: StringFee currency.
timestamp: u64Trade timestamp in milliseconds.
trade_seq: u64Trade sequence number.
liquidity: StringLiquidity: “M” (maker) or “T” (taker).
order_type: StringOrder type.
index_price: DecimalIndex price at trade time.
mark_price: DecimalMark price at trade time.
tick_direction: i8Tick direction (0-3).
state: StringOrder state after this trade.
label: Option<String>User-defined label (client order ID).
reduce_only: boolReduce-only flag.
post_only: boolPost-only flag.
profit_loss: Option<Decimal>Profit/loss for this trade.
Trait Implementations§
Source§impl Clone for DeribitUserTradeMsg
impl Clone for DeribitUserTradeMsg
Source§fn clone(&self) -> DeribitUserTradeMsg
fn clone(&self) -> DeribitUserTradeMsg
Returns a duplicate of the value. Read more
1.0.0 · 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 DeribitUserTradeMsg
impl Debug for DeribitUserTradeMsg
Source§impl<'de> Deserialize<'de> for DeribitUserTradeMsg
impl<'de> Deserialize<'de> for DeribitUserTradeMsg
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 DeribitUserTradeMsg
impl RefUnwindSafe for DeribitUserTradeMsg
impl Send for DeribitUserTradeMsg
impl Sync for DeribitUserTradeMsg
impl Unpin for DeribitUserTradeMsg
impl UnsafeUnpin for DeribitUserTradeMsg
impl UnwindSafe for DeribitUserTradeMsg
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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>
Converts
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>
Converts
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