pub struct Trade {Show 19 fields
pub id: Option<i32>,
pub instrument: Option<InstrumentName>,
pub price: Option<f64>,
pub open_time: Option<String>,
pub state: Option<TradeState>,
pub initial_units: Option<f64>,
pub initial_margin_required: Option<f64>,
pub current_units: Option<f64>,
pub realized_pl: Option<f64>,
pub unrealized_pl: Option<f64>,
pub margin_used: Option<f64>,
pub average_close_price: Option<f64>,
pub closing_transaction_ids: Option<Vec<i32>>,
pub financing: Option<f64>,
pub close_time: Option<String>,
pub client_extensions: Option<Box<ClientExtensions>>,
pub take_profit_order: Option<Box<TakeProfitOrder>>,
pub stop_loss_order: Option<Box<StopLossOrder>>,
pub trailing_stop_loss_order: Option<Box<TrailingStopLossOrder>>,
}Expand description
Trade : The specification of a Trade within an Account. This includes the full representation of the Trade’s dependent Orders in addition to the IDs of those Orders.
Fields§
§id: Option<i32>The Trade’s identifier, unique within the Trade’s Account.
instrument: Option<InstrumentName>§price: Option<f64>The execution price of the Trade.
open_time: Option<String>A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).
state: Option<TradeState>§initial_units: Option<f64>The initial size of the Trade. Negative values indicate a short Trade, and positive values indicate a long Trade.
initial_margin_required: Option<f64>The margin required at the time the Trade was created. Note, this is the ‘pure’ margin required, it is not the ‘effective’ margin used that factors in the trade risk if a GSLO is attached to the trade.
current_units: Option<f64>The number of units currently open for the Trade. This value is reduced to 0.0 as the Trade is closed.
realized_pl: Option<f64>The total profit/loss realized on the closed portion of the Trade.
unrealized_pl: Option<f64>The unrealized profit/loss on the open portion of the Trade.
margin_used: Option<f64>Margin currently used by the Trade.
average_close_price: Option<f64>The average closing price of the Trade. Only present if the Trade has been closed or reduced at least once.
closing_transaction_ids: Option<Vec<i32>>The IDs of the Transactions that have closed portions of this Trade.
financing: Option<f64>The financing paid/collected for this Trade.
close_time: Option<String>A date and time value using either RFC3339 or UNIX time representation. The RFC 3339 representation is a string conforming to https://tools.ietf.org/rfc/rfc3339.txt. The Unix representation is a string representing the number of seconds since the Unix Epoch (January 1st, 1970 at UTC). The value is a fractional number, where the fractional part represents a fraction of a second (up to nine decimal places).
client_extensions: Option<Box<ClientExtensions>>§take_profit_order: Option<Box<TakeProfitOrder>>§stop_loss_order: Option<Box<StopLossOrder>>§trailing_stop_loss_order: Option<Box<TrailingStopLossOrder>>