Account¶
-
class
async_v20.AccountProperties(id: AccountID= sentinel, mt4_account_id: int= sentinel, tags: ArrayStr= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelProperties related to an Account.
-
mt4account_id¶ AccountIDThe Account’s associated MT4 Account ID. This field will not be present if the Account is not an MT4 account.
(
str, …) The Account’s tags
-
-
class
async_v20.AccountChangesState(unrealized_pl: AccountUnits= sentinel, nav: AccountUnits= sentinel, margin_used: AccountUnits= sentinel, margin_available: AccountUnits= sentinel, position_value: AccountUnits= sentinel, margin_closeout_unrealized_pl: AccountUnits= sentinel, margin_closeout_nav: AccountUnits= sentinel, margin_closeout_margin_used: AccountUnits= sentinel, margin_closeout_percent: DecimalNumber= sentinel, margin_closeout_position_value: DecimalNumber= sentinel, withdrawal_limit: AccountUnits= sentinel, margin_call_margin_used: AccountUnits= sentinel, margin_call_percent: DecimalNumber= sentinel, orders: ArrayDynamicOrderState= sentinel, trades: ArrayCalculatedTradeState= sentinel, positions: ArrayCalculatedPositionState= sentinel, balance: AccountUnits= sentinel, pl: AccountUnits= sentinel, resettable_pl: AccountUnits= sentinel, commission: AccountUnits= sentinel, guaranteed_execution_fees: AccountUnits= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelAn 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.
-
unrealized_pl¶ AccountUnitsThe total unrealized profit/loss for all Trades currently open in the Account. Represented in the Account’s home currency.
AccountUnitsThe net asset value of the Account. Equal to Account balance + unrealizedPL. Represented in the Account’s home currency.
-
margin_used¶ AccountUnitsMargin currently used for the Account. Represented in the Account’s home currency.
-
margin_available¶ AccountUnitsMargin available for Account. Represented in the Account’s home currency.
-
position_value¶ AccountUnitsThe value of the Account’s open positions represented in the Account’s home currency.
-
margin_closeout_unrealized_pl¶ AccountUnitsThe Account’s margin closeout unrealized PL.
AccountUnitsThe Account’s margin closeout NAV.
-
margin_closeout_margin_used¶ AccountUnitsThe Account’s margin closeout margin used.
-
margin_closeout_percent¶ DecimalNumberThe 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¶ DecimalNumberThe value of the Account’s open positions as used for margin closeout calculations represented in the Account’s home currency.
-
withdrawal_limit¶ AccountUnitsThe 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¶ AccountUnitsThe Account’s margin call margin used.
-
margin_call_percent¶ DecimalNumberThe Account’s margin call percentage. When this value is 1.0 or above the Account is in a margin call situation.
-
orders¶ (
DynamicOrderState, …) The price-dependent state of each pending Order in the Account.
-
trades¶ (
CalculatedTradeState, …) The price-dependent state for each open Trade in the Account.
-
positions¶ (
CalculatedPositionState, ..) The price-dependent state for each open Position in the Account.
-
# TODO add documentation for Pl and resettabel_pl
-
-
class
async_v20.AccountSummary(id: AccountID= sentinel, alias: str= sentinel, currency: Currency= sentinel, balance: AccountUnits= sentinel, created_by_user_id: int= sentinel, created_time: DateTime= sentinel, pl: AccountUnits= sentinel, resettable_pl: AccountUnits= sentinel, resettabled_pl_time: DateTime= sentinel, commission: AccountUnits= sentinel, margin_rate: DecimalNumber= sentinel, margin_call_enter_time: DateTime= sentinel, margin_call_extension_count: int= sentinel, last_margin_call_extension_time: DateTime= sentinel, open_trade_count: int= sentinel, open_position_count: int= sentinel, pending_order_count: int= sentinel, hedging_enabled: bool= sentinel, unrealized_pl: AccountUnits= sentinel, nav: AccountUnits= sentinel, margin_used: AccountUnits= sentinel, margin_available: AccountUnits= sentinel, position_value: AccountUnits= sentinel, margin_closeout_unrealized_pl: AccountUnits= sentinel, margin_closeout_nav: AccountUnits= sentinel, margin_closeout_margin_used: AccountUnits= sentinel, margin_closeout_percent: DecimalNumber= sentinel, margin_closeout_position_value: DecimalNumber= sentinel, withdrawal_limit: AccountUnits= sentinel, margin_call_margin_used: AccountUnits= sentinel, margin_call_percent: DecimalNumber= sentinel, last_transaction_id: TransactionID= sentinel, trades: ArrayTradeSummary= sentinel, positions: ArrayPosition= sentinel, orders: ArrayOrder= sentinel, financing: DecimalNumber= sentinel, guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode= sentinel, resettable_pl_time: DateTime= sentinel, guaranteed_execution_fees: AccountUnits= sentinel, dividend: DecimalNumber= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelA summary representation of a client’s Account. The AccountSummary does not provide to full specification of pending Orders, open Trades and Positions.
-
alias¶ strClient-assigned alias for the Account. Only provided if the Account has an alias set
-
balance¶ AccountUnitsThe current balance of the Account. Represented in the Account’s home currency.
-
created_by_user_id¶ intID of the user that created the Account.
-
pl¶ AccountUnitsThe total profit/loss realized over the lifetime of the Account. Represented in the Account’s home currency.
-
resettable_pl¶ AccountUnitsThe total realized profit/loss for the Account since it was last reset by the client. Represented in the Account’s home currency.
-
commission¶ AccountUnitsThe total amount of commission paid over the lifetime of the Account. Represented in the Account’s home currency.
-
margin_rate¶ DecimalNumberClient-provided margin rate override for the Account. The effective margin rate of the Account is the lesser of this value and the OANDA margin rate for the Account’s division. This value is only provided if a margin rate override exists for the Account.
-
margin_call_enter_time¶ DateTimeThe date/time when the Account entered a margin call state. Only provided if the Account is in a margin call.
-
margin_call_extension_count¶ intThe number of times that the Account’s current margin call was extended.
-
last_margin_call_extension_time¶ DateTimeThe date/time of the Account’s last margin call extension.
-
open_trade_count¶ intThe number of Trades currently open in the Account.
-
open_position_count¶ intThe number of Positions currently open in the Account.
-
pending_order_count¶ intThe number of Orders currently pending in the Account.
-
hedging_enabled¶ boolFlag indicating that the Account has hedging enabled.
-
unrealized_pl¶ AccountUnitsThe total unrealized profit/loss for all Trades currently open in the Account. Represented in the Account’s home currency.
AccountUnitsThe net asset value of the Account. Equal to Account balance + unrealizedPL. Represented in the Account’s home currency.
-
margin_used¶ AccountUnitsMargin currently used for the Account. Represented in the Account’s home currency.
-
margin_available¶ AccountUnitsMargin available for Account. Represented in the Account’s home currency.
-
position_value¶ AccountUnitsThe value of the Account’s open positions represented in the Account’s home currency.
-
margin_closeout_unrealized_pl¶ AccountUnitsThe Account’s margin closeout unrealized PL.
AccountUnitsThe Account’s margin closeout NAV.
-
margin_closeout_margin_used¶ AccountUnitsThe Account’s margin closeout margin used.
-
margin_closeout_percent¶ DecimalNumberThe 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¶ DecimalNumberThe value of the Account’s open positions as used for margin closeout calculations represented in the Account’s home currency.
-
withdrawal_limit¶ AccountUnitsThe 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¶ AccountUnitsThe Account’s margin call margin used.
-
margin_call_percent¶ DecimalNumberThe Account’s margin call percentage. When this value is 1.0 or above the Account is in a margin call situation.
-
last_transaction_id¶ TransactionIDThe ID of the last Transaction created for the Account.
-
dividend¶ DecimalNumberDividend
-
dividendAdjustment¶ AccountUnitsSomething
-
-
class
async_v20.Account(id: AccountID= sentinel, alias: str= sentinel, currency: Currency= sentinel, balance: AccountUnits= sentinel, created_by_user_id: int= sentinel, created_time: DateTime= sentinel, pl: AccountUnits= sentinel, resettable_pl: AccountUnits= sentinel, resettabled_pl_time: DateTime= sentinel, commission: AccountUnits= sentinel, margin_rate: DecimalNumber= sentinel, margin_call_enter_time: DateTime= sentinel, margin_call_extension_count: int= sentinel, last_margin_call_extension_time: DateTime= sentinel, open_trade_count: int= sentinel, open_position_count: int= sentinel, pending_order_count: int= sentinel, hedging_enabled: bool= sentinel, unrealized_pl: AccountUnits= sentinel, nav: AccountUnits= sentinel, margin_used: AccountUnits= sentinel, margin_available: AccountUnits= sentinel, position_value: AccountUnits= sentinel, margin_closeout_unrealized_pl: AccountUnits= sentinel, margin_closeout_nav: AccountUnits= sentinel, margin_closeout_margin_used: AccountUnits= sentinel, margin_closeout_percent: DecimalNumber= sentinel, margin_closeout_position_value: DecimalNumber= sentinel, withdrawal_limit: AccountUnits= sentinel, margin_call_margin_used: AccountUnits= sentinel, margin_call_percent: DecimalNumber= sentinel, last_transaction_id: TransactionID= sentinel, trades: ArrayTradeSummary= sentinel, positions: ArrayPosition= sentinel, orders: ArrayOrder= sentinel, financing: DecimalNumber= sentinel, guaranteed_stop_loss_order_mode: GuaranteedStopLossOrderMode= sentinel, resettable_pl_time: DateTime= sentinel, dividend: DecimalNumber= sentinel, dividend_adjustment: AccountUnits= sentinel, guaranteed_execution_fees: AccountUnits= sentinel)[source]¶ Bases:
async_v20.definitions.types.AccountSummaryThe full details of a client’s Account. This includes full open Trade, open Position and pending Order representation.
-
alias¶ strClient-assigned alias for the Account. Only provided if the Account has an alias set
-
balance¶ AccountUnitsThe current balance of the Account. Represented in the Account’s home currency.
-
created_by_user_id¶ intID of the user that created the Account.
-
pl¶ AccountUnitsThe total profit/loss realized over the lifetime of the Account. Represented in the Account’s home currency.
-
resettable_pl¶ AccountUnitsThe total realized profit/loss for the Account since it was last reset by the client. Represented in the Account’s home currency.
-
commission¶ AccountUnitsThe total amount of commission paid over the lifetime of the Account. Represented in the Account’s home currency.
-
margin_rate¶ DecimalNumberClient-provided margin rate override for the Account. The effective margin rate of the Account is the lesser of this value and the OANDA margin rate for the Account’s division. This value is only provided if a margin rate override exists for the Account.
-
margin_call_enter_time¶ DateTimeThe date/time when the Account entered a margin call state. Only provided if the Account is in a margin call.
-
margin_call_extension_count¶ intThe number of times that the Account’s current margin call was extended.
-
last_margin_call_extension_time¶ DateTimeThe date/time of the Account’s last margin call extension.
-
open_trade_count¶ intThe number of Trades currently open in the Account.
-
open_position_count¶ intThe number of Positions currently open in the Account.
-
pending_order_count¶ intThe number of Orders currently pending in the Account.
-
hedging_enabled¶ boolFlag indicating that the Account has hedging enabled.
-
unrealized_pl¶ AccountUnitsThe total unrealized profit/loss for all Trades currently open in the Account. Represented in the Account’s home currency.
AccountUnitsThe net asset value of the Account. Equal to Account balance + unrealizedPL. Represented in the Account’s home currency.
-
margin_used¶ AccountUnitsMargin currently used for the Account. Represented in the Account’s home currency.
-
margin_available¶ AccountUnitsMargin available for Account. Represented in the Account’s home currency.
-
position_value¶ AccountUnitsThe value of the Account’s open positions represented in the Account’s home currency.
-
margin_closeout_unrealized_pl¶ AccountUnitsThe Account’s margin closeout unrealized PL.
AccountUnitsThe Account’s margin closeout NAV.
-
margin_closeout_margin_used¶ AccountUnitsThe Account’s margin closeout margin used.
-
margin_closeout_percent¶ DecimalNumberThe 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¶ DecimalNumberThe value of the Account’s open positions as used for margin closeout calculations represented in the Account’s home currency.
-
withdrawal_limit¶ AccountUnitsThe 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¶ AccountUnitsThe Account’s margin call margin used.
-
margin_call_percent¶ DecimalNumberThe Account’s margin call percentage. When this value is 1.0 or above the Account is in a margin call situation.
-
last_transaction_id¶ TransactionIDThe ID of the last Transaction created for the Account.
-
trades¶ (
TradeSummary, …) The details of the Trades currently open in the Account.
-
dividend¶ DecimalNumberDividend
-
dividendAdjustment¶ DecimalNumberUndocumented
-
-
class
async_v20.AccountChanges(orders_created: ArrayOrder= sentinel, orders_cancelled: ArrayOrder= sentinel, orders_filled: ArrayOrder= sentinel, orders_triggered: ArrayOrder= sentinel, trades_opened: ArrayTradeSummary= sentinel, trades_reduced: ArrayTradeSummary= sentinel, trades_closed: ArrayTradeSummary= sentinel, positions: ArrayPosition= sentinel, transactions: ArrayTransaction= sentinel)[source]¶ Bases:
async_v20.definitions.base.ModelAn AccountChanges Object is used to represent the changes to an Account’s Orders, Trades and Positions since a specified Account TransactionID in the past.
-
orders_created¶ (
Order, …) The Orders created. These Orders may have been filled, cancelled or triggered in the same period.
-
trades_opened¶ (
TradeSummary, …) The Trades opened.
-
trades_reduced¶ (
TradeSummary, …) The Trades reduced.
-
trades_closed¶ (
TradeSummary, …) The Trades closed.
-
transactions¶ (
Transaction, …) The Transactions that have been generated.
-