pub struct AccountChangesState {Show 26 fields
pub unrealized_pl: Option<Decimal>,
pub nav: Option<Decimal>,
pub margin_used: Option<Decimal>,
pub margin_available: Option<Decimal>,
pub position_value: Option<Decimal>,
pub margin_closeout_unrealized_pl: Option<Decimal>,
pub margin_closeout_nav: Option<Decimal>,
pub margin_closeout_margin_used: Option<Decimal>,
pub margin_closeout_percent: Option<Decimal>,
pub margin_closeout_position_value: Option<Decimal>,
pub withdrawal_limit: Option<Decimal>,
pub margin_call_margin_used: Option<Decimal>,
pub margin_call_percent: Option<Decimal>,
pub balance: Option<Decimal>,
pub pl: Option<Decimal>,
pub resettable_pl: Option<Decimal>,
pub financing: Option<Decimal>,
pub commission: Option<Decimal>,
pub dividend_adjustment: Option<Decimal>,
pub guaranteed_execution_fees: Option<Decimal>,
pub margin_call_enter_time: Option<Timestamp>,
pub margin_call_extension_count: Option<i64>,
pub last_margin_call_extension_time: Option<Timestamp>,
pub orders: Option<Vec<DynamicOrderState>>,
pub trades: Option<Vec<CalculatedTradeState>>,
pub positions: Option<Vec<CalculatedPositionState>>,
}Expand description
An AccountState Object is used to represent an Account’s current price-dependent state. Price-dependent Account state is dependent on OANDA’s current Prices, and includes things like unrealized PL, NAV and Trailing Stop Loss Order state. Fields will be omitted if their value has not changed since the specified transaction ID.
Fields§
§unrealized_pl: Option<Decimal>The total unrealized profit/loss for all Trades currently open in the Account.
The net asset value of the Account. Equal to Account balance + unrealizedPL.
margin_used: Option<Decimal>Margin currently used for the Account.
margin_available: Option<Decimal>Margin available for Account currency.
position_value: Option<Decimal>The value of the Account’s open positions represented in the Account’s home currency.
margin_closeout_unrealized_pl: Option<Decimal>The Account’s margin closeout unrealized PL.
The Account’s margin closeout NAV.
margin_closeout_margin_used: Option<Decimal>The Account’s margin closeout margin used.
margin_closeout_percent: Option<Decimal>The Account’s margin closeout percentage. When this value is 1.0 or above the Account is in a margin closeout situation.
margin_closeout_position_value: Option<Decimal>The value of the Account’s open positions as used for margin closeout calculations represented in the Account’s home currency.
withdrawal_limit: Option<Decimal>The current WithdrawalLimit for the account which will be zero or a positive value indicating how much can be withdrawn from the account.
margin_call_margin_used: Option<Decimal>The Account’s margin call margin used.
margin_call_percent: Option<Decimal>The Account’s margin call percentage. When this value is 1.0 or above the Account is in a margin call situation.
balance: Option<Decimal>The current balance of the account.
pl: Option<Decimal>The total profit/loss realized over the lifetime of the Account.
resettable_pl: Option<Decimal>The total realized profit/loss for the account since it was last reset by the client.
financing: Option<Decimal>The total amount of financing paid/collected over the lifetime of the account.
commission: Option<Decimal>The total amount of commission paid over the lifetime of the Account.
dividend_adjustment: Option<Decimal>The total amount of dividend adjustment paid over the lifetime of the Account in the Account’s home currency.
guaranteed_execution_fees: Option<Decimal>The total amount of fees charged over the lifetime of the Account for the execution of guaranteed Stop Loss Orders.
margin_call_enter_time: Option<Timestamp>The date/time when the Account entered a margin call state. Only provided if the Account is in a margin call.
margin_call_extension_count: Option<i64>The number of times that the Account’s current margin call was extended.
last_margin_call_extension_time: Option<Timestamp>The date/time of the Account’s last margin call extension.
orders: Option<Vec<DynamicOrderState>>The price-dependent state of each pending Order in the Account.
trades: Option<Vec<CalculatedTradeState>>The price-dependent state for each open Trade in the Account.
positions: Option<Vec<CalculatedPositionState>>The price-dependent state for each open Position in the Account.