#[non_exhaustive]pub struct PositionSide {
pub units: Option<DecimalNumber>,
pub average_price: Option<PriceValue>,
pub trade_ids: Vec<TradeId>,
pub pl: Option<AccountUnits>,
pub unrealized_pl: Option<AccountUnits>,
pub resettable_pl: Option<AccountUnits>,
pub financing: Option<AccountUnits>,
pub guaranteed_execution_fees: Option<AccountUnits>,
pub dividend_adjustment: Option<DecimalNumber>,
pub true_unrealized_pl: Option<DecimalNumber>,
}Expand description
The representation of a Position for a single direction (long or short).
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.units: Option<DecimalNumber>Number of units in the position (negative value indicates short position, positive indicates long position).
average_price: Option<PriceValue>Volume-weighted average of the underlying Trade open prices for the Position.
trade_ids: Vec<TradeId>List of the open Trade IDs which contribute to the open Position.
pl: Option<AccountUnits>Profit/loss realized by the PositionSide over the lifetime of the Account.
unrealized_pl: Option<AccountUnits>The unrealized profit/loss of all open Trades that contribute to this PositionSide.
resettable_pl: Option<AccountUnits>Profit/loss realized by the PositionSide since the Account’s resettablePL was last reset by the client.
financing: Option<AccountUnits>The total amount of financing paid/collected for this PositionSide 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 attached to Trades for this PositionSide.
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.
Trait Implementations§
Source§impl Clone for PositionSide
impl Clone for PositionSide
Source§fn clone(&self) -> PositionSide
fn clone(&self) -> PositionSide
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more