#[non_exhaustive]pub struct Position {
pub instrument: Option<InstrumentName>,
pub pl: Option<AccountUnits>,
pub unrealized_pl: Option<AccountUnits>,
pub margin_used: Option<AccountUnits>,
pub resettable_pl: Option<AccountUnits>,
pub financing: Option<AccountUnits>,
pub commission: Option<AccountUnits>,
pub guaranteed_execution_fees: Option<AccountUnits>,
pub long: Option<PositionSide>,
pub short: Option<PositionSide>,
pub dividend_adjustment: Option<DecimalNumber>,
pub true_unrealized_pl: Option<DecimalNumber>,
}Expand description
The specification of a Position within an Account.
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.instrument: Option<InstrumentName>The Position’s Instrument.
pl: Option<AccountUnits>Profit/loss realized by the Position over the lifetime of the Account.
unrealized_pl: Option<AccountUnits>The unrealized profit/loss of all open Trades that contribute to this Position.
margin_used: Option<AccountUnits>Margin currently used by the Position.
resettable_pl: Option<AccountUnits>Profit/loss realized by the Position since the Account’s resettablePL was last reset by the client.
financing: Option<AccountUnits>The total amount of financing paid/collected for this instrument over the lifetime of the Account.
commission: Option<AccountUnits>The total amount of commission paid for this instrument over the lifetime of the Account.
guaranteed_execution_fees: Option<AccountUnits>The total amount of fees charged over the lifetime of the Account for the execution of guaranteed Stop Loss Orders for this instrument.
long: Option<PositionSide>The long field.
short: Option<PositionSide>The short field.
dividend_adjustment: Option<DecimalNumber>The total amount of dividend adjustment paid. This field is returned by the live v20 API but is not present in OANDA’s official documentation.
true_unrealized_pl: Option<DecimalNumber>The unrealized profit/loss inclusive of unsettled amounts. This field is returned by the live v20 API but is not present in OANDA’s official documentation.