pub struct DerivePublicTrade {Show 17 fields
pub direction: DeriveOrderSide,
pub index_price: Decimal,
pub instrument_name: Ustr,
pub liquidity_role: Option<DeriveLiquidityRole>,
pub mark_price: Decimal,
pub quote_id: Option<String>,
pub rfq_id: Option<String>,
pub realized_pnl: Option<Decimal>,
pub subaccount_id: Option<i64>,
pub timestamp: i64,
pub trade_amount: Decimal,
pub trade_fee: Option<Decimal>,
pub trade_id: String,
pub trade_price: Decimal,
pub tx_hash: Option<String>,
pub tx_status: Option<DeriveTxStatus>,
pub wallet: Option<Ustr>,
}Expand description
Public trade record returned by public/get_trade_history and the
trades.{instrument_type}.{currency} WS channel.
The public WS feed strips private fields (subaccount, wallet, settlement
metadata, role, fee, PnL) and only carries values visible to every market
participant. Those fields are modelled as Option so the same struct can
deserialize both the HTTP shape (richer, when the caller has account
context) and the WS shape (slim).
Fields§
§direction: DeriveOrderSideTrade side.
index_price: DecimalUnderlying index price at the time of the trade.
instrument_name: UstrInstrument identifier.
liquidity_role: Option<DeriveLiquidityRole>Maker / taker role of the aggressor. Only populated when the caller has account context; absent on the public WS feed.
mark_price: DecimalMark price at the time of the trade.
quote_id: Option<String>RFQ quote ID when relevant.
rfq_id: Option<String>RFQ session ID when the trade originated from a request-for-quote.
realized_pnl: Option<Decimal>Realized PnL attributed to the caller. Absent on the public WS feed.
subaccount_id: Option<i64>Aggressor subaccount. Absent on the public WS feed.
timestamp: i64Trade timestamp (UNIX ms).
trade_amount: DecimalFilled amount.
trade_fee: Option<Decimal>Fee charged to the caller. Absent on the public WS feed.
trade_id: StringTrade identifier.
trade_price: DecimalExecution price.
tx_hash: Option<String>On-chain settlement tx hash. Absent on the public WS feed.
tx_status: Option<DeriveTxStatus>On-chain settlement status. Absent on the public WS feed.
wallet: Option<Ustr>Aggressor wallet address. Absent on the public WS feed.
Trait Implementations§
Source§impl Clone for DerivePublicTrade
impl Clone for DerivePublicTrade
Source§fn clone(&self) -> DerivePublicTrade
fn clone(&self) -> DerivePublicTrade
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 DerivePublicTrade
impl Debug for DerivePublicTrade
Source§impl<'de> Deserialize<'de> for DerivePublicTrade
impl<'de> Deserialize<'de> for DerivePublicTrade
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 DerivePublicTrade
impl RefUnwindSafe for DerivePublicTrade
impl Send for DerivePublicTrade
impl Sync for DerivePublicTrade
impl Unpin for DerivePublicTrade
impl UnsafeUnpin for DerivePublicTrade
impl UnwindSafe for DerivePublicTrade
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<'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>
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