#[non_exhaustive]pub struct TradeOpen {
pub trade_id: Option<TradeId>,
pub units: Option<DecimalNumber>,
pub price: Option<PriceValue>,
pub guaranteed_execution_fee: Option<AccountUnits>,
pub client_extensions: Option<ClientExtensions>,
pub half_spread_cost: Option<AccountUnits>,
pub initial_margin_required: Option<AccountUnits>,
pub quote_guaranteed_execution_fee: Option<DecimalNumber>,
pub guaranteed_execution_fee_home_conversion_cost: Option<DecimalNumber>,
}Expand description
A TradeOpen object represents a Trade for an instrument that was opened in an Account. It is found embedded in Transactions that affect the position of an instrument in the Account, specifically the OrderFill Transaction.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.trade_id: Option<TradeId>The ID of the Trade that was opened
units: Option<DecimalNumber>The number of units opened by the Trade
price: Option<PriceValue>The average price that the units were opened at.
guaranteed_execution_fee: Option<AccountUnits>This is the fee charged for opening the trade if it has a guaranteed Stop Loss Order attached to it.
client_extensions: Option<ClientExtensions>The clientExtensions field.
half_spread_cost: Option<AccountUnits>The half spread cost for the trade open. This can be a positive or negative value and is represented in the home currency of the Account.
initial_margin_required: Option<AccountUnits>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.
quote_guaranteed_execution_fee: Option<DecimalNumber>The guaranteed execution fee expressed in the Instrument’s quote currency. This field is returned by the live v20 API but is not present in OANDA’s official documentation.
guaranteed_execution_fee_home_conversion_cost: Option<DecimalNumber>The cost of converting the guaranteed execution fee to the Account’s home currency. This field is returned by the live v20 API but is not present in OANDA’s official documentation.