pub struct DeriveTrade {Show 19 fields
pub direction: DeriveOrderSide,
pub index_price: Decimal,
pub instrument_name: Ustr,
pub is_transfer: bool,
pub label: Ustr,
pub liquidity_role: DeriveLiquidityRole,
pub mark_price: Decimal,
pub order_id: String,
pub quote_id: Option<String>,
pub realized_pnl: Decimal,
pub subaccount_id: i64,
pub timestamp: i64,
pub trade_amount: Decimal,
pub trade_fee: Decimal,
pub trade_id: String,
pub trade_price: Decimal,
pub tx_hash: Option<String>,
pub tx_status: DeriveTxStatus,
pub wallet: Option<Ustr>,
}Expand description
Private trade record returned by private/get_trade_history and the
{subaccount_id}.trades WS channel.
Fields§
§direction: DeriveOrderSideTrade side.
index_price: DecimalUnderlying index price at the time of the trade.
instrument_name: UstrInstrument identifier.
is_transfer: boolWhether this trade was generated via private/transfer_position.
label: UstrFree-form user label inherited from the order.
liquidity_role: DeriveLiquidityRoleMaker / taker role of the user.
mark_price: DecimalMark price at the time of the trade.
order_id: StringOriginating order ID.
quote_id: Option<String>RFQ quote ID when relevant.
realized_pnl: DecimalRealized PnL booked by this trade.
subaccount_id: i64Owning subaccount.
timestamp: i64Trade timestamp (UNIX ms).
trade_amount: DecimalFilled amount on this trade.
trade_fee: DecimalFee charged for this trade.
trade_id: StringTrade identifier.
trade_price: DecimalTrade execution price.
tx_hash: Option<String>On-chain settlement tx hash, absent until settlement starts.
tx_status: DeriveTxStatusOn-chain settlement status.
wallet: Option<Ustr>Owning wallet address, absent in pending order responses.
Trait Implementations§
Source§impl Clone for DeriveTrade
impl Clone for DeriveTrade
Source§fn clone(&self) -> DeriveTrade
fn clone(&self) -> DeriveTrade
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 DeriveTrade
impl Debug for DeriveTrade
Source§impl<'de> Deserialize<'de> for DeriveTrade
impl<'de> Deserialize<'de> for DeriveTrade
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 DeriveTrade
impl RefUnwindSafe for DeriveTrade
impl Send for DeriveTrade
impl Sync for DeriveTrade
impl Unpin for DeriveTrade
impl UnsafeUnpin for DeriveTrade
impl UnwindSafe for DeriveTrade
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
Mutably borrows from an owned value. Read more
impl<'de, T> BorrowedRpcObject<'de> for Twhere
T: RpcBorrow<'de> + RpcSend,
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>
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