Primitives

class async_v20.AcceptDatetimeFormat[source]

Bases: str, async_v20.definitions.primitives.Primitive

DateTime header

class async_v20.AccountFinancingMode[source]

Bases: str, async_v20.definitions.primitives.Primitive

The financing mode of an Account

class async_v20.AccountID[source]

Bases: str, async_v20.definitions.primitives.Primitive

The string representation of an Account Identifier.

class async_v20.AccountUnits[source]

Bases: float, async_v20.definitions.primitives.Primitive

The string representation of a quantity of an Account’s home currency.

class async_v20.CancellableOrderType[source]

Bases: str, async_v20.definitions.primitives.Primitive

The type of the Order.

class async_v20.CandlestickGranularity[source]

Bases: str, async_v20.definitions.primitives.Primitive

The granularity of a candlestick

class async_v20.ClientComment[source]

Bases: str, async_v20.definitions.primitives.Primitive

A client-provided comment that can contain any data and may be assigned to their Orders or Trades. Comments are typically used to provide extra context or meaning to an Order or Trade.

class async_v20.ClientID[source]

Bases: str, async_v20.definitions.primitives.Primitive, async_v20.definitions.primitives.Specifier

A client-provided identifier, used by clients to refer to their Orders or Trades with an identifier that they have provided.

class async_v20.ClientTag[source]

Bases: str, async_v20.definitions.primitives.Primitive

A client-provided tag that can contain any data and may be assigned to their Orders or Trades. Tags are typically used to associate groups of Trades and/or Orders together.

class async_v20.Currency[source]

Bases: str, async_v20.definitions.primitives.Primitive

Currency name identifier. Used by clients to refer to currencies.

class async_v20.DateTime[source]

Bases: async_v20.definitions.primitives.Primitive

A date and time value using either RFC3339 or UNIX time representation.

class async_v20.DecimalNumber[source]

Bases: float, async_v20.definitions.primitives.Primitive

The string representation of a decimal number.

class async_v20.Direction[source]

Bases: str, async_v20.definitions.primitives.Primitive

In the context of an Order or a Trade, defines whether the units are positive or negative.

class async_v20.FundingReason[source]

Bases: async_v20.definitions.primitives.Reason

The reason that an Account is being funded.

class async_v20.InstrumentName[source]

Bases: str, async_v20.definitions.primitives.Primitive

Instrument name identifier. Used by clients to refer to an Instrument.

class async_v20.InstrumentType[source]

Bases: str, async_v20.definitions.primitives.Primitive

The type of an Instrument.

class async_v20.LimitOrderReason[source]

Bases: async_v20.definitions.primitives.Reason

The reason that the Limit Order was initiated

class async_v20.MarketIfTouchedOrderReason[source]

Bases: async_v20.definitions.primitives.Reason

The reason that the Market-if-touched Order was initiated

class async_v20.MarketOrderMarginCloseoutReason[source]

Bases: async_v20.definitions.primitives.Reason

The reason that the Market Order was created to perform a margin closeout

class async_v20.MarketOrderReason[source]

Bases: async_v20.definitions.primitives.Reason

The reason that the Market Order was created

class async_v20.OrderCancelReason[source]

Bases: async_v20.definitions.primitives.Reason

The reason that an Order was cancelled.

class async_v20.OrderFillReason[source]

Bases: async_v20.definitions.primitives.Reason

The reason that an Order was filled

class async_v20.OrderID[source]

Bases: int, async_v20.definitions.primitives.Primitive, async_v20.definitions.primitives.Specifier

The Order’s identifier, unique within the Order’s Account.

class async_v20.OrderPositionFill[source]

Bases: str, async_v20.definitions.primitives.Primitive

Specification of how Positions in the Account are modified when the Order is filled.

class async_v20.OrderSpecifier[source]

Bases: str, async_v20.definitions.primitives.Primitive, async_v20.definitions.primitives.Specifier

The specification of an Order as referred to by clients

class async_v20.OrderState[source]

Bases: str, async_v20.definitions.primitives.Primitive

The current state of the Order.

class async_v20.OrderStateFilter[source]

Bases: str, async_v20.definitions.primitives.Primitive

The state to filter the requested Orders by.

class async_v20.OrderTriggerCondition[source]

Bases: str, async_v20.definitions.primitives.Primitive

Specification of which price component should be used when determining if an Order should be triggered and filled. This allows Orders to be triggered based on the bid, ask, mid, default (ask for buy, bid for sell) or inverse ( ask for sell, bid for buy) price depending on the desired behaviour. Orders are always filled using their default price component. This feature is only provided through the REST API. Clients who choose to specify a non-default trigger condition will not see it reflected in any of OANDA’s proprietary or partner trading platforms, their transaction history or their account statements. OANDA platforms always assume that an Order’s trigger condition is set to the default value when indicating the distance from an Order’s trigger price, and will always provide the default trigger condition when creating or modifying an Order.

class async_v20.OrderType[source]

Bases: str, async_v20.definitions.primitives.Primitive

The type of the Order.

class async_v20.PositionAggregationMode[source]

Bases: str, async_v20.definitions.primitives.Primitive

The way that position values for an Account are calculated and aggregated.

class async_v20.PriceComponent[source]

Bases: str, async_v20.definitions.primitives.Primitive

class async_v20.PriceStatus[source]

Bases: str, async_v20.definitions.primitives.Primitive

The status of the Price.

class async_v20.PriceValue[source]

Bases: float, async_v20.definitions.primitives.Primitive

The string representation of a Price for an Instrument.

class async_v20.Reason[source]

Bases: async_v20.definitions.primitives.Primitive, str

Generic reason for any transaction that may occur

class async_v20.RequestID[source]

Bases: str, async_v20.definitions.primitives.Primitive

The request identifier.

class async_v20.StopLossOrderReason[source]

Bases: async_v20.definitions.primitives.Reason

The reason that the Stop Loss Order was initiated

class async_v20.StopOrderReason[source]

Bases: async_v20.definitions.primitives.Reason

The reason that the Stop Order was initiated

class async_v20.TakeProfitOrderReason[source]

Bases: async_v20.definitions.primitives.Reason

The reason that the Take Profit Order was initiated

class async_v20.TimeInForce[source]

Bases: str, async_v20.definitions.primitives.Primitive

The time-in-force of an Order. TimeInForce describes how long an Order should remain pending before being automatically cancelled by the execution system.

class async_v20.TradeID[source]

Bases: int, async_v20.definitions.primitives.Primitive, async_v20.definitions.primitives.Specifier

The Trade’s identifier, unique within the Trade’s Account.

class async_v20.TradePL[source]

Bases: str, async_v20.definitions.primitives.Primitive

The classification of TradePLs.

class async_v20.TradeSpecifier[source]

Bases: str, async_v20.definitions.primitives.Primitive, async_v20.definitions.primitives.Specifier

The identification of a Trade as referred to by clients

class async_v20.TradeState[source]

Bases: str, async_v20.definitions.primitives.Primitive

The current state of the Trade.

class async_v20.TradeStateFilter[source]

Bases: str, async_v20.definitions.primitives.Primitive

The state to filter the Trades by

class async_v20.TrailingStopLossOrderReason[source]

Bases: async_v20.definitions.primitives.Reason

The reason that the Trailing Stop Loss Order was initiated

class async_v20.TransactionFilter[source]

Bases: str, async_v20.definitions.primitives.Primitive

A filter that can be used when fetching Transactions

class async_v20.TransactionID[source]

Bases: int, async_v20.definitions.primitives.Primitive, async_v20.definitions.primitives.Specifier

The unique Transaction identifier within each Account.

class async_v20.TransactionRejectReason[source]

Bases: async_v20.definitions.primitives.Reason

The reason that a Transaction was rejected.

class async_v20.TransactionType[source]

Bases: str, async_v20.definitions.primitives.Primitive

The possible types of a Transaction

class async_v20.WeeklyAlignment[source]

Bases: str, async_v20.definitions.primitives.Primitive

The day of the week to use for candlestick granularities with weekly alignment.