pub struct UserTrade {Show 30 fields
pub amount: f64,
pub api: Option<bool>,
pub contracts: Option<f64>,
pub direction: String,
pub fee: f64,
pub fee_currency: String,
pub index_price: f64,
pub instrument_name: String,
pub iv: Option<f64>,
pub label: Option<String>,
pub liquidity: String,
pub mark_price: f64,
pub matching_id: Option<String>,
pub mmp: Option<bool>,
pub order_id: String,
pub order_type: String,
pub original_order_type: Option<String>,
pub post_only: Option<bool>,
pub price: f64,
pub profit_loss: Option<f64>,
pub reduce_only: Option<bool>,
pub risk_reducing: Option<bool>,
pub self_trade: bool,
pub state: String,
pub tick_direction: i32,
pub timestamp: u64,
pub trade_id: String,
pub trade_seq: u64,
pub underlying_price: Option<f64>,
pub user_id: Option<u64>,
}Expand description
User trade information
Fields§
§amount: f64Trade amount in base currency units
api: Option<bool>Whether the order was placed via API
contracts: Option<f64>Number of contracts traded
direction: StringTrade direction (buy/sell)
fee: f64Trading fee paid
fee_currency: StringCurrency of the trading fee
index_price: f64Index price at execution time
instrument_name: StringName of the traded instrument
iv: Option<f64>Implied volatility (for options)
label: Option<String>User-defined label for the trade
liquidity: StringLiquidity type (M=maker, T=taker)
mark_price: f64Mark price at execution time
matching_id: Option<String>Matching engine identifier
mmp: Option<bool>Whether Market Maker Protection was active
order_id: StringOrder ID that generated this trade
order_type: StringType of the order that generated this trade
original_order_type: Option<String>Original order type before modifications
post_only: Option<bool>Whether this was a post-only order
price: f64Execution price
profit_loss: Option<f64>Profit or loss from this trade
reduce_only: Option<bool>Whether this was a reduce-only order
risk_reducing: Option<bool>Whether this trade was risk reducing
self_trade: boolWhether this was a self trade
state: StringCurrent state of the trade
tick_direction: i32Price tick direction (1=up, -1=down, 0=no change)
timestamp: u64Execution timestamp (milliseconds since UNIX epoch)
trade_id: StringUnique trade identifier
trade_seq: u64Trade sequence number
underlying_price: Option<f64>Underlying asset price (for derivatives)
user_id: Option<u64>User ID who executed the trade
Trait Implementations§
Source§impl<'de> Deserialize<'de> for UserTrade
impl<'de> Deserialize<'de> for UserTrade
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 UserTrade
impl RefUnwindSafe for UserTrade
impl Send for UserTrade
impl Sync for UserTrade
impl Unpin for UserTrade
impl UnwindSafe for UserTrade
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.