Expand description
Provider-native OANDA v20 models.
Required fields follow the provider definitions; optional fields preserve absence,
including documented provider defaults and partial account-change snapshots.
Scalar enums retain unrecognized spellings in Unknown for forward compatibility.
Financial values use exact decimals, accepting documented strings and numeric
liquidity without a floating-point conversion. Typed endpoint admission validates
outbound instructions separately, so decoding retains provider evidence.
Structs§
- Account
- The full details of a client’s Account. This includes full open Trade, open Position and pending Order representation.
- Account
Changes - An
AccountChangesObject is used to represent the changes to an Account’s Orders, Trades and Positions since a specified AccountTransactionIDin the past. - Account
Changes State - An
AccountStateObject 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. - AccountID
- Validated OANDA AccountID.
- Account
Properties - Properties related to an Account.
- Account
Summary - A summary representation of a client’s Account. The
AccountSummarydoes not provide a full specification of pending Orders, open Trades and Positions. - Accumulated
Account State - The mutable state of a client’s Account.
- Calculated
Account State - The dynamically calculated state of a client’s Account.
- Calculated
Position State - The dynamic (calculated) state of a Position
- Calculated
Trade State - The dynamic (calculated) state of an open Trade
- Candle
Specification - Validated OANDA CandleSpecification.
- Candlestick
- The Candlestick representation
- Candlestick
Data - The price data (open, high, low, close) for the Candlestick representation.
- Candlestick
Response - Response containing instrument, granularity, and list of candles.
- Client
Comment - Validated OANDA ClientComment.
- Client
Configure Reject Transaction - A
ClientConfigureRejectTransactionrepresents the rejection of configuration of an Account by a client. - Client
Configure Transaction - A
ClientConfigureTransactionrepresents the configuration of an Account by a client. - Client
Extensions - A
ClientExtensionsobject allows a client to attach a clientID, tag and comment to Orders and Trades in their Account. Do not set, modify, or delete this field if your account is associated with MT4. - ClientID
- Validated OANDA ClientID.
- Client
Price - The specification of an Account-specific Price.
- Client
RequestID - Validated OANDA ClientRequestID.
- Client
Tag - Validated OANDA ClientTag.
- Close
Transaction - A
CloseTransactionrepresents the closing of an Account. - Conversion
Factor - A
ConversionFactorcontains information used to convert an amount, from an Instrument’s base or quote currency, to the home currency of an Account. - Create
Transaction - A
CreateTransactionrepresents the creation of an Account. - Currency
- Validated OANDA Currency.
- Daily
Financing Transaction - A
DailyFinancingTransactionrepresents the daily payment/collection of financing for an Account. - Date
Time - UTC instant accepted from RFC3339 or OANDA’s fractional Unix-seconds form.
- Delayed
Trade Closure Transaction - A
DelayedTradeClosureTransaction is created administratively to indicate open trades that should have been closed but weren’t because the open trades’ instruments were untradeable at the time. Open trades listed in this transaction will be closed once their respective instruments become tradeable. - Dividend
Adjustment Transaction - A
DividendAdjustmentTransaction is created administratively to pay or collect dividend adjustment mounts to or from an Account. - Dynamic
Order State - The dynamic state of an Order. This is only relevant to
TrailingStopLossOrders, as no other Order type has dynamic state. - Financing
DayOf Week - A
FinancingDayOfWeekmessage defines a day of the week when financing charges are debited or credited. - Fixed
Price Order - A
FixedPriceOrderis an order that is filled immediately upon creation using a fixed price. - Fixed
Price Order Transaction - A
FixedPriceOrderTransactionrepresents the creation of a Fixed Price Order in the user’s account. A Fixed Price Order is an Order that is filled immediately at a specified price. - Guaranteed
Stop Loss Details GuaranteedStopLossDetailsspecifies the details of a Guaranteed Stop Loss Order to be created on behalf of a client. This may happen when an Order is filled that opens a Trade requiring a Guaranteed Stop Loss, or when a Trade’s dependent Guaranteed Stop Loss Order is modified directly through the Trade.- Guaranteed
Stop Loss Order - A
GuaranteedStopLossOrderis an order that is linked to an open Trade and created with a price threshold which is guaranteed against slippage that may occur as the market crosses the price set for that order. The Order will be filled (closing the Trade) by the first price that is equal to or worse than the threshold. The price level specified for theGuaranteedStopLossOrdermust be at least the configured minimum distance (in price units) away from the entry price for the traded instrument. AGuaranteedStopLossOrdercannot be used to open a new Position. - Guaranteed
Stop Loss Order Entry Data - Details required by clients creating a Guaranteed Stop Loss Order
- Guaranteed
Stop Loss Order Level Restriction - A
GuaranteedStopLossOrderLevelRestrictionrepresents the total position size that can exist within a given price window for Trades with guaranteed Stop Loss Orders attached for a specific Instrument. - Guaranteed
Stop Loss Order Parameters - The current mutability and hedging settings related to guaranteed Stop Loss orders.
- Guaranteed
Stop Loss Order Reject Transaction - A
GuaranteedStopLossOrderRejectTransactionrepresents the rejection of the creation of aGuaranteedStopLossOrder. - Guaranteed
Stop Loss Order Request - A
GuaranteedStopLossOrderRequestspecifies the parameters that may be set when creating a Guaranteed Stop Loss Order. Only one of the price and distance fields may be specified. - Guaranteed
Stop Loss Order Transaction - A
GuaranteedStopLossOrderTransactionrepresents the creation of aGuaranteedStopLossOrder in the user’s Account. - Home
Conversion Factors - A
HomeConversionFactorsmessage contains information used to convert amounts, from an Instrument’s base or quote currency, to the home currency of an Account. - Home
Conversions HomeConversionsrepresents the factors to use to convert quantities of a given currency into the Account’s home currency. The conversion factor depends on the scenario the conversion is required for.- Instrument
- Full specification of an Instrument.
- Instrument
Commission - An
InstrumentCommissionrepresents an instrument-specific commission - Instrument
Financing - Financing data for the instrument.
- Instrument
Name - Validated OANDA InstrumentName.
- Invalid
Id - A rejected provider identifier, retained for caller correction without cloning.
- Limit
Order - A
LimitOrderis an order that is created with a price threshold, and will only be filled by a price that is equal to or better than the threshold. - Limit
Order Reject Transaction - A
LimitOrderRejectTransactionrepresents the rejection of the creation of a Limit Order. - Limit
Order Request - A
LimitOrderRequestspecifies the parameters that may be set when creating a Limit Order. - Limit
Order Transaction - A
LimitOrderTransactionrepresents the creation of a Limit Order in the user’s Account. - Liquidity
Regeneration Schedule - A
LiquidityRegenerationScheduleindicates how liquidity that is used when filling an Order for an instrument is regenerated following the fill. A liquidity regeneration schedule will be in effect until the timestamp of its final step, but may be replaced by a schedule created for an Order of the same instrument that is filled while it is still in effect. - Liquidity
Regeneration Schedule Step - A liquidity regeneration schedule Step indicates the amount of bid and ask liquidity that is used by the Account at a certain time. These amounts will only change at the timestamp of the following step.
- Margin
Call Enter Transaction - A
MarginCallEnterTransactionis created when an Account enters the margin call state. - Margin
Call Exit Transaction - A
MarginCallExitTransactionis created when an Account leaves the margin call state. - Margin
Call Extend Transaction - A
MarginCallExtendTransactionis created when the margin call state for an Account has been extended. - Market
IfTouched Order - A
MarketIfTouchedOrderis an order that is created with a price threshold, and will only be filled by a market price that touches or crosses the threshold. - Market
IfTouched Order Reject Transaction - A
MarketIfTouchedOrderRejectTransactionrepresents the rejection of the creation of aMarketIfTouchedOrder. - Market
IfTouched Order Request - A
MarketIfTouchedOrderRequestspecifies the parameters that may be set when creating a Market-if-Touched Order. - Market
IfTouched Order Transaction - A
MarketIfTouchedOrderTransactionrepresents the creation of aMarketIfTouchedOrder in the user’s Account. - Market
Order - A
MarketOrderis an order that is filled immediately upon creation using the current market price. - Market
Order Delayed Trade Close - Details for the Market Order extensions specific to a Market Order placed with the intent of fully closing a specific open trade that should have already been closed but wasn’t due to halted market conditions
- Market
Order Margin Closeout - Details for the Market Order extensions specific to a Market Order placed that is part of a Market Order Margin Closeout in a client’s account
- Market
Order Position Closeout - A
MarketOrderPositionCloseoutspecifies the extensions to a Market Order when it has been created to closeout a specific Position. - Market
Order Reject Transaction - A
MarketOrderRejectTransactionrepresents the rejection of the creation of a Market Order. - Market
Order Request - A
MarketOrderRequestspecifies the parameters that may be set when creating a Market Order. - Market
Order Trade Close - A
MarketOrderTradeClosespecifies the extensions to a Market Order that has been created specifically to close a Trade. - Market
Order Transaction - A
MarketOrderTransactionrepresents the creation of a Market Order in the user’s account. A Market Order is an Order that is filled immediately at the current market price. Market Orders can be specialized when they are created to accomplish a specific task: to close a Trade, to closeout a Position or to participate in a Margin closeout. - Open
Trade Dividend Adjustment - Used to pay or collect a dividend adjustment amount for an open Trade within the Account.
- Open
Trade Financing OpenTradeFinancingis used to pay/collect daily financing charge for an open Trade within an Account- Order
Cancel Reject Transaction - An
OrderCancelRejectTransactionrepresents the rejection of the cancellation of an Order in the client’s Account. - Order
Cancel Transaction - An
OrderCancelTransactionrepresents the cancellation of an Order in the client’s Account. - Order
Client Extensions Modify Reject Transaction - A
OrderClientExtensionsModifyRejectTransactionrepresents the rejection of the modification of an Order’s Client Extensions. - Order
Client Extensions Modify Transaction - A
OrderClientExtensionsModifyTransactionrepresents the modification of an Order’s Client Extensions. - Order
Fill Transaction - An
OrderFillTransactionrepresents the filling of an Order in the client’s Account. - OrderID
- Validated OANDA OrderID.
- Order
Identifier - An
OrderIdentifieris used to refer to an Order, and contains both theOrderIDand theClientOrderID. - Order
Specifier - Validated OANDA OrderSpecifier.
- Position
- The specification of a Position within an Account.
- Position
Financing OpenTradeFinancingis used to pay/collect daily financing charge for a Position within an Account- Position
Side - The representation of a Position for a single direction (long or short).
- Price
Bucket - A
PriceBucketrepresents a price available for an amount of liquidity - Pricing
Component - Validated OANDA PricingComponent.
- Pricing
Heartbeat - A
PricingHeartbeatobject is injected into the Pricing stream to ensure that the HTTP connection remains active. - Quote
Home Conversion Factors QuoteHomeConversionFactorsrepresents the factors that can be used to convert quantities of a Price’s Instrument’s quote currency into the Account’s home currency.- Reopen
Transaction - A
ReopenTransactionrepresents the re-opening of a closed Account. - RequestID
- Validated OANDA RequestID.
- Reset
ResettablePL Transaction - A
ResetResettablePLTransactionrepresents the resetting of the Account’s resettable PL counters. - Stop
Loss Details StopLossDetailsspecifies the details of a Stop Loss Order to be created on behalf of a client. This may happen when an Order is filled that opens a Trade requiring a Stop Loss, or when a Trade’s dependent Stop Loss Order is modified directly through the Trade.- Stop
Loss Order - A
StopLossOrderis an order that is linked to an open Trade and created with a price threshold. The Order will be filled (closing the Trade) by the first price that is equal to or worse than the threshold. AStopLossOrdercannot be used to open a new Position. - Stop
Loss Order Reject Transaction - A
StopLossOrderRejectTransactionrepresents the rejection of the creation of aStopLossOrder. - Stop
Loss Order Request - A
StopLossOrderRequestspecifies the parameters that may be set when creating a Stop Loss Order. Only one of the price and distance fields may be specified. - Stop
Loss Order Transaction - A
StopLossOrderTransactionrepresents the creation of aStopLossOrder in the user’s Account. - Stop
Order - A
StopOrderis an order that is created with a price threshold, and will only be filled by a price that is equal to or worse than the threshold. - Stop
Order Reject Transaction - A
StopOrderRejectTransactionrepresents the rejection of the creation of a Stop Order. - Stop
Order Request - A
StopOrderRequestspecifies the parameters that may be set when creating a Stop Order. - Stop
Order Transaction - A
StopOrderTransactionrepresents the creation of a Stop Order in the user’s Account. - Tag
- A tag associated with an entity.
- Take
Profit Details TakeProfitDetailsspecifies the details of a Take Profit Order to be created on behalf of a client. This may happen when an Order is filled that opens a Trade requiring a Take Profit, or when a Trade’s dependent Take Profit Order is modified directly through the Trade.- Take
Profit Order - A
TakeProfitOrderis an order that is linked to an open Trade and created with a price threshold. The Order will be filled (closing the Trade) by the first price that is equal to or better than the threshold. ATakeProfitOrdercannot be used to open a new Position. - Take
Profit Order Reject Transaction - A
TakeProfitOrderRejectTransactionrepresents the rejection of the creation of aTakeProfitOrder. - Take
Profit Order Request - A
TakeProfitOrderRequestspecifies the parameters that may be set when creating a Take Profit Order. - Take
Profit Order Transaction - A
TakeProfitOrderTransactionrepresents the creation of aTakeProfitOrder in the user’s Account. - Trade
- The specification of a Trade within an Account. This includes the full representation of the Trade’s dependent Orders in addition to the IDs of those Orders.
- Trade
Client Extensions Modify Reject Transaction - A
TradeClientExtensionsModifyRejectTransactionrepresents the rejection of the modification of a Trade’s Client Extensions. - Trade
Client Extensions Modify Transaction - A
TradeClientExtensionsModifyTransactionrepresents the modification of a Trade’s Client Extensions. - TradeID
- Validated OANDA TradeID.
- Trade
Open - A
TradeOpenobject represents a Trade for an instrument that was opened in an Account. It is found embedded in Transactions that affect the position of an instrument in the Account, specifically theOrderFillTransaction. - Trade
Reduce - A
TradeReduceobject represents a Trade for an instrument that was reduced (either partially or fully) in an Account. It is found embedded in Transactions that affect the position of an instrument in the account, specifically theOrderFillTransaction. - Trade
Specifier - Validated OANDA TradeSpecifier.
- Trade
Summary - The summary of a Trade within an Account. This representation does not provide the full details of the Trade’s dependent Orders.
- Trailing
Stop Loss Details TrailingStopLossDetailsspecifies the details of a Trailing Stop Loss Order to be created on behalf of a client. This may happen when an Order is filled that opens a Trade requiring a Trailing Stop Loss, or when a Trade’s dependent Trailing Stop Loss Order is modified directly through the Trade.- Trailing
Stop Loss Order - A
TrailingStopLossOrderis an order that is linked to an open Trade and created with a price distance. The price distance is used to calculate a trailing stop value for the order that is in the losing direction from the market price at the time of the order’s creation. The trailing stop value will follow the market price as it moves in the winning direction, and the order will be filled (closing the Trade) by the first price that is equal to or worse than the trailing stop value. ATrailingStopLossOrdercannot be used to open a new Position. - Trailing
Stop Loss Order Reject Transaction - A
TrailingStopLossOrderRejectTransactionrepresents the rejection of the creation of aTrailingStopLossOrder. - Trailing
Stop Loss Order Request - A
TrailingStopLossOrderRequestspecifies the parameters that may be set when creating a Trailing Stop Loss Order. - Trailing
Stop Loss Order Transaction - A
TrailingStopLossOrderTransactionrepresents the creation of aTrailingStopLossOrder in the user’s Account. - Transaction
Heartbeat - A
TransactionHeartbeatobject is injected into the Transaction stream to ensure that the HTTP connection remains active. - TransactionID
- Validated OANDA TransactionID.
- Transfer
Funds Reject Transaction - A
TransferFundsRejectTransactionrepresents the rejection of the transfer of funds in/out of an Account. - Transfer
Funds Transaction - A
TransferFundsTransactionrepresents the transfer of funds in/out of an Account. - Units
Available - Representation of how many units of an Instrument are available to be traded by an Order depending on its positionFill option.
- Units
Available Details - Representation of many units of an Instrument are available to be traded for both long and short Orders.
- User
Attributes - Contains the attributes of a user.
Enums§
- Accept
Datetime Format - Unrecognized spellings are retained and serialized unchanged for provider
compatibility; endpoint admission applies any operation-specific restrictions.
DateTimeheader - Account
Financing Mode - The financing mode of an Account
- Cancellable
Order Type - The type of the Order.
- Candlestick
Granularity - Unrecognized spellings are retained and serialized unchanged for provider compatibility; endpoint admission applies any operation-specific restrictions. The granularity of a candlestick
- DayOf
Week - The
DayOfWeekprovides a representation of the day of the week. - Direction
- In the context of an Order or a Trade, defines whether the units are positive or negative.
- Fixed
Price Order Reason - The reason that the Fixed Price Order was created
- Funding
Reason - The reason that an Account is being funded.
- Guaranteed
Stop Loss Order Mode - The overall behaviour of the Account regarding guaranteed Stop Loss Orders.
- Guaranteed
Stop Loss Order Mode ForInstrument - The overall behaviour of the Account regarding Guaranteed Stop Loss Orders for a specific Instrument.
- Guaranteed
Stop Loss Order Mutability - For Accounts that support guaranteed Stop Loss Orders, describes the actions that can be performed on guaranteed Stop Loss Orders.
- Guaranteed
Stop Loss Order Reason - The reason that the Guaranteed Stop Loss Order was initiated
- Instrument
Type - The type of an Instrument.
- Invalid
IdKind - Why an identifier was rejected at its public construction boundary.
- Limit
Order Reason - The reason that the Limit Order was initiated
- Market
IfTouched Order Reason - The reason that the Market-if-touched Order was initiated
- Market
Order Margin Closeout Reason - The reason that the Market Order was created to perform a margin closeout
- Market
Order Reason - The reason that the Market Order was created
- Order
- Documented Order variants identified by OANDA’s
typefield. Unknown provider objects retain their discriminator and raw fields for inspection. - Order
Cancel Reason - The reason that an Order was cancelled.
- Order
Fill Reason - The reason that an Order was filled
- Order
Position Fill - Specification of how Positions in the Account are modified when the Order is filled.
- Order
Request - Documented
OrderRequestvariants identified by OANDA’stypefield. Unknown request variants are rejected rather than forwarded as trading instructions. - Order
State - The current state of the Order.
- Order
State Filter - Unrecognized spellings are retained and serialized unchanged for provider compatibility; endpoint admission applies any operation-specific restrictions. The state to filter the requested Orders by.
- Order
Trigger Condition - 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. A special restriction applies when creating a Guaranteed Stop Loss
Order. In this case the
TriggerConditionvalue must either be “DEFAULT”, or the “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for short trades “DEFAULT” and “ASK” are valid. - Order
Type - The type of the Order.
- Position
Aggregation Mode - The way that position values for an Account are calculated and aggregated.
- Price
Status - The status of the Price.
- Stop
Loss Order Reason - The reason that the Stop Loss Order was initiated
- Stop
Order Reason - The reason that the Stop Order was initiated
- Take
Profit Order Reason - The reason that the Take Profit Order was initiated
- Time
InForce - The time-in-force of an Order.
TimeInForcedescribes how long an Order should remain pending before being automatically cancelled by the execution system. - TradePL
- The classification of
TradePLs. - Trade
State - The current state of the Trade.
- Trade
State Filter - Unrecognized spellings are retained and serialized unchanged for provider compatibility; endpoint admission applies any operation-specific restrictions. The state to filter the Trades by
- Trailing
Stop Loss Order Reason - The reason that the Trailing Stop Loss Order was initiated
- Transaction
- Documented Transaction variants identified by OANDA’s
typefield. Unknown provider objects retain their discriminator and raw fields for inspection. - Transaction
Filter - Unrecognized spellings are retained and serialized unchanged for provider compatibility; endpoint admission applies any operation-specific restrictions. A filter that can be used when fetching Transactions
- Transaction
Reject Reason - The reason that a Transaction was rejected.
- Transaction
Type - The possible types of a Transaction
- Weekly
Alignment - Unrecognized spellings are retained and serialized unchanged for provider compatibility; endpoint admission applies any operation-specific restrictions. The day of the week to use for candlestick granularities with weekly alignment.
Type Aliases§
- Account
Units - Exact account-currency units.
- Decimal
Number - Exact OANDA decimal number.
- Price
Value - Exact provider price.