#[non_exhaustive]pub struct TradeReduce {Show 14 fields
pub trade_id: Option<TradeId>,
pub units: Option<DecimalNumber>,
pub price: Option<PriceValue>,
pub realized_pl: Option<AccountUnits>,
pub financing: Option<AccountUnits>,
pub guaranteed_execution_fee: Option<AccountUnits>,
pub half_spread_cost: Option<AccountUnits>,
pub base_financing: Option<DecimalNumber>,
pub quote_guaranteed_execution_fee: Option<DecimalNumber>,
pub financing_rate: Option<DecimalNumber>,
pub home_conversion_cost: Option<DecimalNumber>,
pub pl_home_conversion_cost: Option<DecimalNumber>,
pub base_financing_home_conversion_cost: Option<DecimalNumber>,
pub guaranteed_execution_fee_home_conversion_cost: Option<DecimalNumber>,
}Expand description
A TradeReduce object represents a Trade for an instrument that was reduced (either partially or fully) 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 reduced or closed
units: Option<DecimalNumber>The number of units that the Trade was reduced by
price: Option<PriceValue>The average price that the units were closed at. This price may be clamped for guaranteed Stop Loss Orders.
realized_pl: Option<AccountUnits>The PL realized when reducing the Trade
financing: Option<AccountUnits>The financing paid/collected when reducing the Trade
guaranteed_execution_fee: Option<AccountUnits>This is the fee that is charged for closing the Trade if it has a guaranteed Stop Loss Order attached to it.
half_spread_cost: Option<AccountUnits>The half spread cost for the trade reduce/close. This can be a positive or negative value and is represented in the home currency of the Account.
base_financing: Option<DecimalNumber>The financing paid or collected in the Instrument’s base currency. This field is returned by the live v20 API but is not present in OANDA’s official documentation.
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.
financing_rate: Option<DecimalNumber>The financing rate in effect for the reduced Trade. This field is returned by the live v20 API but is not present in OANDA’s official documentation.
home_conversion_cost: Option<DecimalNumber>The total cost of currency conversions, in the Account’s home currency. This field is returned by the live v20 API but is not present in OANDA’s official documentation.
pl_home_conversion_cost: Option<DecimalNumber>The cost of converting the realized profit/loss to the Account’s home currency. This field is returned by the live v20 API but is not present in OANDA’s official documentation.
base_financing_home_conversion_cost: Option<DecimalNumber>The cost of converting the base financing to the Account’s home 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.
Trait Implementations§
Source§impl Clone for TradeReduce
impl Clone for TradeReduce
Source§fn clone(&self) -> TradeReduce
fn clone(&self) -> TradeReduce
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more