Which API should I use?

  • Use v20 REST API only if you have a v20 account
  • Use v1 REST API if your account id contains only digits (ie. 2534253) as it is a legacy account

Transaction Definitions


Transactions

The specification of all Transactions supported by the platform.

Implemented by: ClientConfigureTransaction, ClientConfigureRejectTransaction, OrderFillTransaction, OrderCancelTransaction, OrderCancelRejectTransaction, OrderClientExtensionsModifyTransaction, OrderClientExtensionsModifyRejectTransaction, MarketOrderTransaction, MarketOrderRejectTransaction, TradeClientExtensionsModifyTransaction, TradeClientExtensionsModifyRejectTransaction, TakeProfitOrderTransaction, StopLossOrderTransaction, TrailingStopLossOrderTransaction, TakeProfitOrderRejectTransaction, StopLossOrderRejectTransaction, TrailingStopLossOrderRejectTransaction, CreateTransaction, CloseTransaction, ReopenTransaction, TransferFundsTransaction, TransferFundsRejectTransaction, LimitOrderTransaction, LimitOrderRejectTransaction, StopOrderTransaction, StopOrderRejectTransaction, MarketIfTouchedOrderTransaction, MarketIfTouchedOrderRejectTransaction, MarginCallEnterTransaction, MarginCallExtendTransaction, MarginCallExitTransaction, DelayedTradeClosureTransaction, DailyFinancingTransaction, ResetResettablePLTransaction

Transaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID)
}

CreateTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “CREATE” in a
    # CreateTransaction.
    # 
    type : (TransactionType, default=CREATE),

    # 
    # The ID of the Division that the Account is in
    # 
    divisionID : (integer),

    # 
    # The ID of the Site that the Account was created at
    # 
    siteID : (integer),

    # 
    # The ID of the user that the Account was created for
    # 
    accountUserID : (integer),

    # 
    # The number of the Account within the site/division/user
    # 
    accountNumber : (integer),

    # 
    # The home currency of the Account
    # 
    homeCurrency : (Currency)
}

CloseTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “CLOSE” in a CloseTransaction.
    # 
    type : (TransactionType, default=CLOSE)
}

ReopenTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “REOPEN” in a
    # ReopenTransaction.
    # 
    type : (TransactionType, default=REOPEN)
}

ClientConfigureTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “CLIENT_CONFIGURE” in a
    # ClientConfigureTransaction.
    # 
    type : (TransactionType, default=CLIENT_CONFIGURE),

    # 
    # The client-provided alias for the Account.
    # 
    alias : (string),

    # 
    # The margin rate override for the Account.
    # 
    marginRate : (DecimalNumber)
}

ClientConfigureRejectTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “CLIENT_CONFIGURE_REJECT” in a
    # ClientConfigureRejectTransaction.
    # 
    type : (TransactionType, default=CLIENT_CONFIGURE_REJECT),

    # 
    # The client-provided alias for the Account.
    # 
    alias : (string),

    # 
    # The margin rate override for the Account.
    # 
    marginRate : (DecimalNumber),

    # 
    # The reason that the Reject Transaction was created
    # 
    rejectReason : (TransactionRejectReason)
}

TransferFundsTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “TRANSFER_FUNDS” in a
    # TransferFundsTransaction.
    # 
    type : (TransactionType, default=TRANSFER_FUNDS),

    # 
    # The amount to deposit/withdraw from the Account in the Account’s home
    # currency. A positive value indicates a deposit, a negative value
    # indicates a withdrawal.
    # 
    amount : (AccountUnits),

    # 
    # The reason that an Account is being funded.
    # 
    fundingReason : (FundingReason),

    # 
    # An optional comment that may be attached to a fund transfer for audit
    # purposes
    # 
    comment : (string),

    # 
    # The Account’s balance after funds are transferred.
    # 
    accountBalance : (AccountUnits)
}

TransferFundsRejectTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “TRANSFER_FUNDS_REJECT” in a
    # TransferFundsRejectTransaction.
    # 
    type : (TransactionType, default=TRANSFER_FUNDS_REJECT),

    # 
    # The amount to deposit/withdraw from the Account in the Account’s home
    # currency. A positive value indicates a deposit, a negative value
    # indicates a withdrawal.
    # 
    amount : (AccountUnits),

    # 
    # The reason that an Account is being funded.
    # 
    fundingReason : (FundingReason),

    # 
    # An optional comment that may be attached to a fund transfer for audit
    # purposes
    # 
    comment : (string),

    # 
    # The reason that the Reject Transaction was created
    # 
    rejectReason : (TransactionRejectReason)
}

MarketOrderTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “MARKET_ORDER” in a
    # MarketOrderTransaction.
    # 
    type : (TransactionType, default=MARKET_ORDER),

    # 
    # The Market Order’s Instrument.
    # 
    instrument : (InstrumentName, required),

    # 
    # The quantity requested to be filled by the Market Order. A posititive
    # number of units results in a long Order, and a negative number of units
    # results in a short Order.
    # 
    units : (DecimalNumber, required),

    # 
    # The time-in-force requested for the Market Order. Restricted to FOK or
    # IOC for a MarketOrder.
    # 
    timeInForce : (TimeInForce, required, default=FOK),

    # 
    # The worst price that the client is willing to have the Market Order
    # filled at.
    # 
    priceBound : (PriceValue),

    # 
    # Specification of how Positions in the Account are modified when the Order
    # is filled.
    # 
    positionFill : (OrderPositionFill, required, default=DEFAULT),

    # 
    # Details of the Trade requested to be closed, only provided when the
    # Market Order is being used to explicitly close a Trade.
    # 
    tradeClose : (MarketOrderTradeClose),

    # 
    # Details of the long Position requested to be closed out, only provided
    # when a Market Order is being used to explicitly closeout a long Position.
    # 
    longPositionCloseout : (MarketOrderPositionCloseout),

    # 
    # Details of the short Position requested to be closed out, only provided
    # when a Market Order is being used to explicitly closeout a short
    # Position.
    # 
    shortPositionCloseout : (MarketOrderPositionCloseout),

    # 
    # Details of the Margin Closeout that this Market Order was created for
    # 
    marginCloseout : (MarketOrderMarginCloseout),

    # 
    # Details of the delayed Trade close that this Market Order was created for
    # 
    delayedTradeClose : (MarketOrderDelayedTradeClose),

    # 
    # The reason that the Market Order was created
    # 
    reason : (MarketOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The specification of the Take Profit Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    takeProfitOnFill : (TakeProfitDetails),

    # 
    # The specification of the Stop Loss Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    stopLossOnFill : (StopLossDetails),

    # 
    # The specification of the Trailing Stop Loss Order that should be created
    # for a Trade that is opened when the Order is filled (if such a Trade is
    # created).
    # 
    trailingStopLossOnFill : (TrailingStopLossDetails),

    # 
    # Client Extensions to add to the Trade created when the Order is filled
    # (if such a Trade is created).  Do not set, modify, delete
    # tradeClientExtensions if your account is associated with MT4.
    # 
    tradeClientExtensions : (ClientExtensions)
}

MarketOrderRejectTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “MARKET_ORDER_REJECT” in a
    # MarketOrderRejectTransaction.
    # 
    type : (TransactionType, default=MARKET_ORDER_REJECT),

    # 
    # The Market Order’s Instrument.
    # 
    instrument : (InstrumentName, required),

    # 
    # The quantity requested to be filled by the Market Order. A posititive
    # number of units results in a long Order, and a negative number of units
    # results in a short Order.
    # 
    units : (DecimalNumber, required),

    # 
    # The time-in-force requested for the Market Order. Restricted to FOK or
    # IOC for a MarketOrder.
    # 
    timeInForce : (TimeInForce, required, default=FOK),

    # 
    # The worst price that the client is willing to have the Market Order
    # filled at.
    # 
    priceBound : (PriceValue),

    # 
    # Specification of how Positions in the Account are modified when the Order
    # is filled.
    # 
    positionFill : (OrderPositionFill, required, default=DEFAULT),

    # 
    # Details of the Trade requested to be closed, only provided when the
    # Market Order is being used to explicitly close a Trade.
    # 
    tradeClose : (MarketOrderTradeClose),

    # 
    # Details of the long Position requested to be closed out, only provided
    # when a Market Order is being used to explicitly closeout a long Position.
    # 
    longPositionCloseout : (MarketOrderPositionCloseout),

    # 
    # Details of the short Position requested to be closed out, only provided
    # when a Market Order is being used to explicitly closeout a short
    # Position.
    # 
    shortPositionCloseout : (MarketOrderPositionCloseout),

    # 
    # Details of the Margin Closeout that this Market Order was created for
    # 
    marginCloseout : (MarketOrderMarginCloseout),

    # 
    # Details of the delayed Trade close that this Market Order was created for
    # 
    delayedTradeClose : (MarketOrderDelayedTradeClose),

    # 
    # The reason that the Market Order was created
    # 
    reason : (MarketOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The specification of the Take Profit Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    takeProfitOnFill : (TakeProfitDetails),

    # 
    # The specification of the Stop Loss Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    stopLossOnFill : (StopLossDetails),

    # 
    # The specification of the Trailing Stop Loss Order that should be created
    # for a Trade that is opened when the Order is filled (if such a Trade is
    # created).
    # 
    trailingStopLossOnFill : (TrailingStopLossDetails),

    # 
    # Client Extensions to add to the Trade created when the Order is filled
    # (if such a Trade is created).  Do not set, modify, delete
    # tradeClientExtensions if your account is associated with MT4.
    # 
    tradeClientExtensions : (ClientExtensions),

    # 
    # The reason that the Reject Transaction was created
    # 
    rejectReason : (TransactionRejectReason)
}

LimitOrderTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “LIMIT_ORDER” in a
    # LimitOrderTransaction.
    # 
    type : (TransactionType, default=LIMIT_ORDER),

    # 
    # The Limit Order’s Instrument.
    # 
    instrument : (InstrumentName, required),

    # 
    # The quantity requested to be filled by the Limit Order. A posititive
    # number of units results in a long Order, and a negative number of units
    # results in a short Order.
    # 
    units : (DecimalNumber, required),

    # 
    # The price threshold specified for the Limit Order. The Limit Order will
    # only be filled by a market price that is equal to or better than this
    # price.
    # 
    price : (PriceValue, required),

    # 
    # The time-in-force requested for the Limit Order.
    # 
    timeInForce : (TimeInForce, required, default=GTC),

    # 
    # The date/time when the Limit Order will be cancelled if its timeInForce
    # is “GTD”.
    # 
    gtdTime : (DateTime),

    # 
    # Specification of how Positions in the Account are modified when the Order
    # is filled.
    # 
    positionFill : (OrderPositionFill, required, default=DEFAULT),

    # 
    # 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.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # The reason that the Limit Order was initiated
    # 
    reason : (LimitOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The specification of the Take Profit Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    takeProfitOnFill : (TakeProfitDetails),

    # 
    # The specification of the Stop Loss Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    stopLossOnFill : (StopLossDetails),

    # 
    # The specification of the Trailing Stop Loss Order that should be created
    # for a Trade that is opened when the Order is filled (if such a Trade is
    # created).
    # 
    trailingStopLossOnFill : (TrailingStopLossDetails),

    # 
    # Client Extensions to add to the Trade created when the Order is filled
    # (if such a Trade is created).  Do not set, modify, delete
    # tradeClientExtensions if your account is associated with MT4.
    # 
    tradeClientExtensions : (ClientExtensions),

    # 
    # The ID of the Order that this Order replaces (only provided if this Order
    # replaces an existing Order).
    # 
    replacesOrderID : (OrderID),

    # 
    # The ID of the Transaction that cancels the replaced Order (only provided
    # if this Order replaces an existing Order).
    # 
    cancellingTransactionID : (TransactionID)
}

LimitOrderRejectTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “LIMIT_ORDER_REJECT” in a
    # LimitOrderRejectTransaction.
    # 
    type : (TransactionType, default=LIMIT_ORDER_REJECT),

    # 
    # The Limit Order’s Instrument.
    # 
    instrument : (InstrumentName, required),

    # 
    # The quantity requested to be filled by the Limit Order. A posititive
    # number of units results in a long Order, and a negative number of units
    # results in a short Order.
    # 
    units : (DecimalNumber, required),

    # 
    # The price threshold specified for the Limit Order. The Limit Order will
    # only be filled by a market price that is equal to or better than this
    # price.
    # 
    price : (PriceValue, required),

    # 
    # The time-in-force requested for the Limit Order.
    # 
    timeInForce : (TimeInForce, required, default=GTC),

    # 
    # The date/time when the Limit Order will be cancelled if its timeInForce
    # is “GTD”.
    # 
    gtdTime : (DateTime),

    # 
    # Specification of how Positions in the Account are modified when the Order
    # is filled.
    # 
    positionFill : (OrderPositionFill, required, default=DEFAULT),

    # 
    # 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.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # The reason that the Limit Order was initiated
    # 
    reason : (LimitOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The specification of the Take Profit Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    takeProfitOnFill : (TakeProfitDetails),

    # 
    # The specification of the Stop Loss Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    stopLossOnFill : (StopLossDetails),

    # 
    # The specification of the Trailing Stop Loss Order that should be created
    # for a Trade that is opened when the Order is filled (if such a Trade is
    # created).
    # 
    trailingStopLossOnFill : (TrailingStopLossDetails),

    # 
    # Client Extensions to add to the Trade created when the Order is filled
    # (if such a Trade is created).  Do not set, modify, delete
    # tradeClientExtensions if your account is associated with MT4.
    # 
    tradeClientExtensions : (ClientExtensions),

    # 
    # The ID of the Order that this Order was intended to replace (only
    # provided if this Order was intended to replace an existing Order).
    # 
    intendedReplacesOrderID : (OrderID),

    # 
    # The reason that the Reject Transaction was created
    # 
    rejectReason : (TransactionRejectReason)
}

StopOrderTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “STOP_ORDER” in a
    # StopOrderTransaction.
    # 
    type : (TransactionType, default=STOP_ORDER),

    # 
    # The Stop Order’s Instrument.
    # 
    instrument : (InstrumentName, required),

    # 
    # The quantity requested to be filled by the Stop Order. A posititive
    # number of units results in a long Order, and a negative number of units
    # results in a short Order.
    # 
    units : (DecimalNumber, required),

    # 
    # The price threshold specified for the Stop Order. The Stop Order will
    # only be filled by a market price that is equal to or worse than this
    # price.
    # 
    price : (PriceValue, required),

    # 
    # The worst market price that may be used to fill this Stop Order. If the
    # market gaps and crosses through both the price and the priceBound, the
    # Stop Order will be cancelled instead of being filled.
    # 
    priceBound : (PriceValue),

    # 
    # The time-in-force requested for the Stop Order.
    # 
    timeInForce : (TimeInForce, required, default=GTC),

    # 
    # The date/time when the Stop Order will be cancelled if its timeInForce is
    # “GTD”.
    # 
    gtdTime : (DateTime),

    # 
    # Specification of how Positions in the Account are modified when the Order
    # is filled.
    # 
    positionFill : (OrderPositionFill, required, default=DEFAULT),

    # 
    # 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.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # The reason that the Stop Order was initiated
    # 
    reason : (StopOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The specification of the Take Profit Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    takeProfitOnFill : (TakeProfitDetails),

    # 
    # The specification of the Stop Loss Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    stopLossOnFill : (StopLossDetails),

    # 
    # The specification of the Trailing Stop Loss Order that should be created
    # for a Trade that is opened when the Order is filled (if such a Trade is
    # created).
    # 
    trailingStopLossOnFill : (TrailingStopLossDetails),

    # 
    # Client Extensions to add to the Trade created when the Order is filled
    # (if such a Trade is created).  Do not set, modify, delete
    # tradeClientExtensions if your account is associated with MT4.
    # 
    tradeClientExtensions : (ClientExtensions),

    # 
    # The ID of the Order that this Order replaces (only provided if this Order
    # replaces an existing Order).
    # 
    replacesOrderID : (OrderID),

    # 
    # The ID of the Transaction that cancels the replaced Order (only provided
    # if this Order replaces an existing Order).
    # 
    cancellingTransactionID : (TransactionID)
}

StopOrderRejectTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “STOP_ORDER_REJECT” in a
    # StopOrderRejectTransaction.
    # 
    type : (TransactionType, default=STOP_ORDER_REJECT),

    # 
    # The Stop Order’s Instrument.
    # 
    instrument : (InstrumentName, required),

    # 
    # The quantity requested to be filled by the Stop Order. A posititive
    # number of units results in a long Order, and a negative number of units
    # results in a short Order.
    # 
    units : (DecimalNumber, required),

    # 
    # The price threshold specified for the Stop Order. The Stop Order will
    # only be filled by a market price that is equal to or worse than this
    # price.
    # 
    price : (PriceValue, required),

    # 
    # The worst market price that may be used to fill this Stop Order. If the
    # market gaps and crosses through both the price and the priceBound, the
    # Stop Order will be cancelled instead of being filled.
    # 
    priceBound : (PriceValue),

    # 
    # The time-in-force requested for the Stop Order.
    # 
    timeInForce : (TimeInForce, required, default=GTC),

    # 
    # The date/time when the Stop Order will be cancelled if its timeInForce is
    # “GTD”.
    # 
    gtdTime : (DateTime),

    # 
    # Specification of how Positions in the Account are modified when the Order
    # is filled.
    # 
    positionFill : (OrderPositionFill, required, default=DEFAULT),

    # 
    # 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.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # The reason that the Stop Order was initiated
    # 
    reason : (StopOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The specification of the Take Profit Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    takeProfitOnFill : (TakeProfitDetails),

    # 
    # The specification of the Stop Loss Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    stopLossOnFill : (StopLossDetails),

    # 
    # The specification of the Trailing Stop Loss Order that should be created
    # for a Trade that is opened when the Order is filled (if such a Trade is
    # created).
    # 
    trailingStopLossOnFill : (TrailingStopLossDetails),

    # 
    # Client Extensions to add to the Trade created when the Order is filled
    # (if such a Trade is created).  Do not set, modify, delete
    # tradeClientExtensions if your account is associated with MT4.
    # 
    tradeClientExtensions : (ClientExtensions),

    # 
    # The ID of the Order that this Order was intended to replace (only
    # provided if this Order was intended to replace an existing Order).
    # 
    intendedReplacesOrderID : (OrderID),

    # 
    # The reason that the Reject Transaction was created
    # 
    rejectReason : (TransactionRejectReason)
}

MarketIfTouchedOrderTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “MARKET_IF_TOUCHED_ORDER” in a
    # MarketIfTouchedOrderTransaction.
    # 
    type : (TransactionType, default=MARKET_IF_TOUCHED_ORDER),

    # 
    # The MarketIfTouched Order’s Instrument.
    # 
    instrument : (InstrumentName, required),

    # 
    # The quantity requested to be filled by the MarketIfTouched Order. A
    # posititive number of units results in a long Order, and a negative number
    # of units results in a short Order.
    # 
    units : (DecimalNumber, required),

    # 
    # The price threshold specified for the MarketIfTouched Order. The
    # MarketIfTouched Order will only be filled by a market price that crosses
    # this price from the direction of the market price at the time when the
    # Order was created (the initialMarketPrice). Depending on the value of the
    # Order’s price and initialMarketPrice, the MarketIfTouchedOrder will
    # behave like a Limit or a Stop Order.
    # 
    price : (PriceValue, required),

    # 
    # The worst market price that may be used to fill this MarketIfTouched
    # Order.
    # 
    priceBound : (PriceValue),

    # 
    # The time-in-force requested for the MarketIfTouched Order. Restricted to
    # “GTC”, “GFD” and “GTD” for MarketIfTouched Orders.
    # 
    timeInForce : (TimeInForce, required, default=GTC),

    # 
    # The date/time when the MarketIfTouched Order will be cancelled if its
    # timeInForce is “GTD”.
    # 
    gtdTime : (DateTime),

    # 
    # Specification of how Positions in the Account are modified when the Order
    # is filled.
    # 
    positionFill : (OrderPositionFill, required, default=DEFAULT),

    # 
    # 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.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # The reason that the Market-if-touched Order was initiated
    # 
    reason : (MarketIfTouchedOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The specification of the Take Profit Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    takeProfitOnFill : (TakeProfitDetails),

    # 
    # The specification of the Stop Loss Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    stopLossOnFill : (StopLossDetails),

    # 
    # The specification of the Trailing Stop Loss Order that should be created
    # for a Trade that is opened when the Order is filled (if such a Trade is
    # created).
    # 
    trailingStopLossOnFill : (TrailingStopLossDetails),

    # 
    # Client Extensions to add to the Trade created when the Order is filled
    # (if such a Trade is created).  Do not set, modify, delete
    # tradeClientExtensions if your account is associated with MT4.
    # 
    tradeClientExtensions : (ClientExtensions),

    # 
    # The ID of the Order that this Order replaces (only provided if this Order
    # replaces an existing Order).
    # 
    replacesOrderID : (OrderID),

    # 
    # The ID of the Transaction that cancels the replaced Order (only provided
    # if this Order replaces an existing Order).
    # 
    cancellingTransactionID : (TransactionID)
}

MarketIfTouchedOrderRejectTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to
    # “MARKET_IF_TOUCHED_ORDER_REJECT” in a
    # MarketIfTouchedOrderRejectTransaction.
    # 
    type : (TransactionType, default=MARKET_IF_TOUCHED_ORDER_REJECT),

    # 
    # The MarketIfTouched Order’s Instrument.
    # 
    instrument : (InstrumentName, required),

    # 
    # The quantity requested to be filled by the MarketIfTouched Order. A
    # posititive number of units results in a long Order, and a negative number
    # of units results in a short Order.
    # 
    units : (DecimalNumber, required),

    # 
    # The price threshold specified for the MarketIfTouched Order. The
    # MarketIfTouched Order will only be filled by a market price that crosses
    # this price from the direction of the market price at the time when the
    # Order was created (the initialMarketPrice). Depending on the value of the
    # Order’s price and initialMarketPrice, the MarketIfTouchedOrder will
    # behave like a Limit or a Stop Order.
    # 
    price : (PriceValue, required),

    # 
    # The worst market price that may be used to fill this MarketIfTouched
    # Order.
    # 
    priceBound : (PriceValue),

    # 
    # The time-in-force requested for the MarketIfTouched Order. Restricted to
    # “GTC”, “GFD” and “GTD” for MarketIfTouched Orders.
    # 
    timeInForce : (TimeInForce, required, default=GTC),

    # 
    # The date/time when the MarketIfTouched Order will be cancelled if its
    # timeInForce is “GTD”.
    # 
    gtdTime : (DateTime),

    # 
    # Specification of how Positions in the Account are modified when the Order
    # is filled.
    # 
    positionFill : (OrderPositionFill, required, default=DEFAULT),

    # 
    # 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.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # The reason that the Market-if-touched Order was initiated
    # 
    reason : (MarketIfTouchedOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The specification of the Take Profit Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    takeProfitOnFill : (TakeProfitDetails),

    # 
    # The specification of the Stop Loss Order that should be created for a
    # Trade opened when the Order is filled (if such a Trade is created).
    # 
    stopLossOnFill : (StopLossDetails),

    # 
    # The specification of the Trailing Stop Loss Order that should be created
    # for a Trade that is opened when the Order is filled (if such a Trade is
    # created).
    # 
    trailingStopLossOnFill : (TrailingStopLossDetails),

    # 
    # Client Extensions to add to the Trade created when the Order is filled
    # (if such a Trade is created).  Do not set, modify, delete
    # tradeClientExtensions if your account is associated with MT4.
    # 
    tradeClientExtensions : (ClientExtensions),

    # 
    # The ID of the Order that this Order was intended to replace (only
    # provided if this Order was intended to replace an existing Order).
    # 
    intendedReplacesOrderID : (OrderID),

    # 
    # The reason that the Reject Transaction was created
    # 
    rejectReason : (TransactionRejectReason)
}

TakeProfitOrderTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “TAKE_PROFIT_ORDER” in a
    # TakeProfitOrderTransaction.
    # 
    type : (TransactionType, default=TAKE_PROFIT_ORDER),

    # 
    # The ID of the Trade to close when the price threshold is breached.
    # 
    tradeID : (TradeID, required),

    # 
    # The client ID of the Trade to be closed when the price threshold is
    # breached.
    # 
    clientTradeID : (ClientID),

    # 
    # The price threshold specified for the TakeProfit Order. The associated
    # Trade will be closed by a market price that is equal to or better than
    # this threshold.
    # 
    price : (PriceValue, required),

    # 
    # The time-in-force requested for the TakeProfit Order. Restricted to
    # “GTC”, “GFD” and “GTD” for TakeProfit Orders.
    # 
    timeInForce : (TimeInForce, required, default=GTC),

    # 
    # The date/time when the TakeProfit Order will be cancelled if its
    # timeInForce is “GTD”.
    # 
    gtdTime : (DateTime),

    # 
    # 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.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # The reason that the Take Profit Order was initiated
    # 
    reason : (TakeProfitOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The ID of the OrderFill Transaction that caused this Order to be created
    # (only provided if this Order was created automatically when another Order
    # was filled).
    # 
    orderFillTransactionID : (TransactionID),

    # 
    # The ID of the Order that this Order replaces (only provided if this Order
    # replaces an existing Order).
    # 
    replacesOrderID : (OrderID),

    # 
    # The ID of the Transaction that cancels the replaced Order (only provided
    # if this Order replaces an existing Order).
    # 
    cancellingTransactionID : (TransactionID)
}

TakeProfitOrderRejectTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “TAKE_PROFIT_ORDER_REJECT” in
    # a TakeProfitOrderRejectTransaction.
    # 
    type : (TransactionType, default=TAKE_PROFIT_ORDER_REJECT),

    # 
    # The ID of the Trade to close when the price threshold is breached.
    # 
    tradeID : (TradeID, required),

    # 
    # The client ID of the Trade to be closed when the price threshold is
    # breached.
    # 
    clientTradeID : (ClientID),

    # 
    # The price threshold specified for the TakeProfit Order. The associated
    # Trade will be closed by a market price that is equal to or better than
    # this threshold.
    # 
    price : (PriceValue, required),

    # 
    # The time-in-force requested for the TakeProfit Order. Restricted to
    # “GTC”, “GFD” and “GTD” for TakeProfit Orders.
    # 
    timeInForce : (TimeInForce, required, default=GTC),

    # 
    # The date/time when the TakeProfit Order will be cancelled if its
    # timeInForce is “GTD”.
    # 
    gtdTime : (DateTime),

    # 
    # 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.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # The reason that the Take Profit Order was initiated
    # 
    reason : (TakeProfitOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The ID of the OrderFill Transaction that caused this Order to be created
    # (only provided if this Order was created automatically when another Order
    # was filled).
    # 
    orderFillTransactionID : (TransactionID),

    # 
    # The ID of the Order that this Order was intended to replace (only
    # provided if this Order was intended to replace an existing Order).
    # 
    intendedReplacesOrderID : (OrderID),

    # 
    # The reason that the Reject Transaction was created
    # 
    rejectReason : (TransactionRejectReason)
}

StopLossOrderTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “STOP_LOSS_ORDER” in a
    # StopLossOrderTransaction.
    # 
    type : (TransactionType, default=STOP_LOSS_ORDER),

    # 
    # The ID of the Trade to close when the price threshold is breached.
    # 
    tradeID : (TradeID, required),

    # 
    # The client ID of the Trade to be closed when the price threshold is
    # breached.
    # 
    clientTradeID : (ClientID),

    # 
    # The price threshold specified for the StopLoss Order. The associated
    # Trade will be closed by a market price that is equal to or worse than
    # this threshold.
    # 
    price : (PriceValue, required),

    # 
    # The time-in-force requested for the StopLoss Order. Restricted to “GTC”,
    # “GFD” and “GTD” for StopLoss Orders.
    # 
    timeInForce : (TimeInForce, required, default=GTC),

    # 
    # The date/time when the StopLoss Order will be cancelled if its
    # timeInForce is “GTD”.
    # 
    gtdTime : (DateTime),

    # 
    # 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.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # The reason that the Stop Loss Order was initiated
    # 
    reason : (StopLossOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The ID of the OrderFill Transaction that caused this Order to be created
    # (only provided if this Order was created automatically when another Order
    # was filled).
    # 
    orderFillTransactionID : (TransactionID),

    # 
    # The ID of the Order that this Order replaces (only provided if this Order
    # replaces an existing Order).
    # 
    replacesOrderID : (OrderID),

    # 
    # The ID of the Transaction that cancels the replaced Order (only provided
    # if this Order replaces an existing Order).
    # 
    cancellingTransactionID : (TransactionID)
}

StopLossOrderRejectTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “STOP_LOSS_ORDER_REJECT” in a
    # StopLossOrderRejectTransaction.
    # 
    type : (TransactionType, default=STOP_LOSS_ORDER_REJECT),

    # 
    # The ID of the Trade to close when the price threshold is breached.
    # 
    tradeID : (TradeID, required),

    # 
    # The client ID of the Trade to be closed when the price threshold is
    # breached.
    # 
    clientTradeID : (ClientID),

    # 
    # The price threshold specified for the StopLoss Order. The associated
    # Trade will be closed by a market price that is equal to or worse than
    # this threshold.
    # 
    price : (PriceValue, required),

    # 
    # The time-in-force requested for the StopLoss Order. Restricted to “GTC”,
    # “GFD” and “GTD” for StopLoss Orders.
    # 
    timeInForce : (TimeInForce, required, default=GTC),

    # 
    # The date/time when the StopLoss Order will be cancelled if its
    # timeInForce is “GTD”.
    # 
    gtdTime : (DateTime),

    # 
    # 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.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # The reason that the Stop Loss Order was initiated
    # 
    reason : (StopLossOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The ID of the OrderFill Transaction that caused this Order to be created
    # (only provided if this Order was created automatically when another Order
    # was filled).
    # 
    orderFillTransactionID : (TransactionID),

    # 
    # The ID of the Order that this Order was intended to replace (only
    # provided if this Order was intended to replace an existing Order).
    # 
    intendedReplacesOrderID : (OrderID),

    # 
    # The reason that the Reject Transaction was created
    # 
    rejectReason : (TransactionRejectReason)
}

TrailingStopLossOrderTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “TRAILING_STOP_LOSS_ORDER” in
    # a TrailingStopLossOrderTransaction.
    # 
    type : (TransactionType, default=TRAILING_STOP_LOSS_ORDER),

    # 
    # The ID of the Trade to close when the price threshold is breached.
    # 
    tradeID : (TradeID, required),

    # 
    # The client ID of the Trade to be closed when the price threshold is
    # breached.
    # 
    clientTradeID : (ClientID),

    # 
    # The price distance specified for the TrailingStopLoss Order.
    # 
    distance : (PriceValue, required),

    # 
    # The time-in-force requested for the TrailingStopLoss Order. Restricted to
    # “GTC”, “GFD” and “GTD” for TrailingStopLoss Orders.
    # 
    timeInForce : (TimeInForce, required, default=GTC),

    # 
    # The date/time when the StopLoss Order will be cancelled if its
    # timeInForce is “GTD”.
    # 
    gtdTime : (DateTime),

    # 
    # 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.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # The reason that the Trailing Stop Loss Order was initiated
    # 
    reason : (TrailingStopLossOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The ID of the OrderFill Transaction that caused this Order to be created
    # (only provided if this Order was created automatically when another Order
    # was filled).
    # 
    orderFillTransactionID : (TransactionID),

    # 
    # The ID of the Order that this Order replaces (only provided if this Order
    # replaces an existing Order).
    # 
    replacesOrderID : (OrderID),

    # 
    # The ID of the Transaction that cancels the replaced Order (only provided
    # if this Order replaces an existing Order).
    # 
    cancellingTransactionID : (TransactionID)
}

TrailingStopLossOrderRejectTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to
    # “TRAILING_STOP_LOSS_ORDER_REJECT” in a
    # TrailingStopLossOrderRejectTransaction.
    # 
    type : (TransactionType, default=TRAILING_STOP_LOSS_ORDER_REJECT),

    # 
    # The ID of the Trade to close when the price threshold is breached.
    # 
    tradeID : (TradeID, required),

    # 
    # The client ID of the Trade to be closed when the price threshold is
    # breached.
    # 
    clientTradeID : (ClientID),

    # 
    # The price distance specified for the TrailingStopLoss Order.
    # 
    distance : (PriceValue, required),

    # 
    # The time-in-force requested for the TrailingStopLoss Order. Restricted to
    # “GTC”, “GFD” and “GTD” for TrailingStopLoss Orders.
    # 
    timeInForce : (TimeInForce, required, default=GTC),

    # 
    # The date/time when the StopLoss Order will be cancelled if its
    # timeInForce is “GTD”.
    # 
    gtdTime : (DateTime),

    # 
    # 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.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # The reason that the Trailing Stop Loss Order was initiated
    # 
    reason : (TrailingStopLossOrderReason),

    # 
    # Client Extensions to add to the Order (only provided if the Order is
    # being created with client extensions).
    # 
    clientExtensions : (ClientExtensions),

    # 
    # The ID of the OrderFill Transaction that caused this Order to be created
    # (only provided if this Order was created automatically when another Order
    # was filled).
    # 
    orderFillTransactionID : (TransactionID),

    # 
    # The ID of the Order that this Order was intended to replace (only
    # provided if this Order was intended to replace an existing Order).
    # 
    intendedReplacesOrderID : (OrderID),

    # 
    # The reason that the Reject Transaction was created
    # 
    rejectReason : (TransactionRejectReason)
}

OrderFillTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “ORDER_FILL” for an
    # OrderFillTransaction.
    # 
    type : (TransactionType, default=ORDER_FILL),

    # 
    # The ID of the Order filled.
    # 
    orderID : (OrderID),

    # 
    # The client Order ID of the Order filled (only provided if the client has
    # assigned one).
    # 
    clientOrderID : (ClientID),

    # 
    # The name of the filled Order’s instrument.
    # 
    instrument : (InstrumentName),

    # 
    # The number of units filled by the Order.
    # 
    units : (DecimalNumber),

    # 
    # The average market price that the Order was filled at.
    # 
    price : (PriceValue),

    # 
    # The price in effect for the account at the time of the Order fill.
    # 
    fullPrice : (ClientPrice),

    # 
    # The reason that an Order was filled
    # 
    reason : (OrderFillReason),

    # 
    # The profit or loss incurred when the Order was filled.
    # 
    pl : (AccountUnits),

    # 
    # The financing paid or collected when the Order was filled.
    # 
    financing : (AccountUnits),

    # 
    # The commission charged in the Account’s home currency as a result of
    # filling the Order. The commission is always represented as a positive
    # quantity of the Account’s home currency, however it reduces the balance
    # in the Account.
    # 
    commission : (AccountUnits),

    # 
    # The Account’s balance after the Order was filled.
    # 
    accountBalance : (AccountUnits),

    # 
    # The Trade that was opened when the Order was filled (only provided if
    # filling the Order resulted in a new Trade).
    # 
    tradeOpened : (TradeOpen),

    # 
    # The Trades that were closed when the Order was filled (only provided if
    # filling the Order resulted in a closing open Trades).
    # 
    tradesClosed : (Array[TradeReduce]),

    # 
    # The Trade that was reduced when the Order was filled (only provided if
    # filling the Order resulted in reducing an open Trade).
    # 
    tradeReduced : (TradeReduce)
}

OrderCancelTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “ORDER_CANCEL” for an
    # OrderCancelTransaction.
    # 
    type : (TransactionType, default=ORDER_CANCEL),

    # 
    # The ID of the Order cancelled
    # 
    orderID : (OrderID),

    # 
    # The client ID of the Order cancelled (only provided if the Order has a
    # client Order ID).
    # 
    clientOrderID : (OrderID),

    # 
    # The reason that the Order was cancelled.
    # 
    reason : (OrderCancelReason),

    # 
    # The ID of the Order that replaced this Order (only provided if this Order
    # was cancelled for replacement).
    # 
    replacedByOrderID : (OrderID)
}

OrderCancelRejectTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “ORDER_CANCEL_REJECT” for an
    # OrderCancelRejectTransaction.
    # 
    type : (TransactionType, default=ORDER_CANCEL_REJECT),

    # 
    # The ID of the Order intended to be cancelled
    # 
    orderID : (OrderID),

    # 
    # The client ID of the Order intended to be cancelled (only provided if the
    # Order has a client Order ID).
    # 
    clientOrderID : (OrderID),

    # 
    # The reason that the Order was to be cancelled.
    # 
    reason : (OrderCancelReason),

    # 
    # The reason that the Reject Transaction was created
    # 
    rejectReason : (TransactionRejectReason)
}

OrderClientExtensionsModifyTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to
    # “ORDER_CLIENT_EXTENSIONS_MODIFY” for a
    # OrderClienteExtensionsModifyTransaction.
    # 
    type : (TransactionType, default=ORDER_CLIENT_EXTENSIONS_MODIFY),

    # 
    # The ID of the Order who’s client extensions are to be modified.
    # 
    orderID : (OrderID),

    # 
    # The original Client ID of the Order who’s client extensions are to be
    # modified.
    # 
    clientOrderID : (ClientID),

    # 
    # The new Client Extensions for the Order.
    # 
    clientExtensionsModify : (ClientExtensions),

    # 
    # The new Client Extensions for the Order’s Trade on fill.
    # 
    tradeClientExtensionsModify : (ClientExtensions)
}

OrderClientExtensionsModifyRejectTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to
    # “ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT” for a
    # OrderClientExtensionsModifyRejectTransaction.
    # 
    type : (TransactionType, default=ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT),

    # 
    # The ID of the Order who’s client extensions are to be modified.
    # 
    orderID : (OrderID),

    # 
    # The original Client ID of the Order who’s client extensions are to be
    # modified.
    # 
    clientOrderID : (ClientID),

    # 
    # The new Client Extensions for the Order.
    # 
    clientExtensionsModify : (ClientExtensions),

    # 
    # The new Client Extensions for the Order’s Trade on fill.
    # 
    tradeClientExtensionsModify : (ClientExtensions),

    # 
    # The reason that the Reject Transaction was created
    # 
    rejectReason : (TransactionRejectReason)
}

TradeClientExtensionsModifyTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to
    # “TRADE_CLIENT_EXTENSIONS_MODIFY” for a
    # TradeClientExtensionsModifyTransaction.
    # 
    type : (TransactionType, default=TRADE_CLIENT_EXTENSIONS_MODIFY),

    # 
    # The ID of the Trade who’s client extensions are to be modified.
    # 
    tradeID : (TradeID),

    # 
    # The original Client ID of the Trade who’s client extensions are to be
    # modified.
    # 
    clientTradeID : (ClientID),

    # 
    # The new Client Extensions for the Trade.
    # 
    tradeClientExtensionsModify : (ClientExtensions)
}

TradeClientExtensionsModifyRejectTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to
    # “TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT” for a
    # TradeClientExtensionsModifyRejectTransaction.
    # 
    type : (TransactionType, default=TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT),

    # 
    # The ID of the Trade who’s client extensions are to be modified.
    # 
    tradeID : (TradeID),

    # 
    # The original Client ID of the Trade who’s client extensions are to be
    # modified.
    # 
    clientTradeID : (ClientID),

    # 
    # The new Client Extensions for the Trade.
    # 
    tradeClientExtensionsModify : (ClientExtensions),

    # 
    # The reason that the Reject Transaction was created
    # 
    rejectReason : (TransactionRejectReason)
}

MarginCallEnterTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “MARGIN_CALL_ENTER” for an
    # MarginCallEnterTransaction.
    # 
    type : (TransactionType, default=MARGIN_CALL_ENTER)
}

MarginCallExtendTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “MARGIN_CALL_EXTEND” for an
    # MarginCallExtendTransaction.
    # 
    type : (TransactionType, default=MARGIN_CALL_EXTEND),

    # 
    # The number of the extensions to the Account’s current margin call that
    # have been applied. This value will be set to 1 for the first
    # MarginCallExtend Transaction
    # 
    extensionNumber : (integer)
}

MarginCallExitTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “MARGIN_CALL_EXIT” for an
    # MarginCallExitTransaction.
    # 
    type : (TransactionType, default=MARGIN_CALL_EXIT)
}

DelayedTradeClosureTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “DELAYED_TRADE_CLOSURE” for an
    # DelayedTradeClosureTransaction.
    # 
    type : (TransactionType, default=DELAYED_TRADE_CLOSURE),

    # 
    # The reason for the delayed trade closure
    # 
    reason : (MarketOrderReason),

    # 
    # List of Trade ID’s identifying the open trades that will be closed when
    # their respective instruments become tradeable
    # 
    tradeIDs : (TradeID)
}

DailyFinancingTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “DAILY_FINANCING” for a
    # DailyFinancingTransaction.
    # 
    type : (TransactionType, default=DAILY_FINANCING),

    # 
    # The amount of financing paid/collected for the Account.
    # 
    financing : (AccountUnits),

    # 
    # The Account’s balance after daily financing.
    # 
    accountBalance : (AccountUnits),

    # 
    # The account financing mode at the time of the daily financing.
    # 
    accountFinancingMode : (AccountFinancingMode),

    # 
    # The financing paid/collected for each Position in the Account.
    # 
    positionFinancings : (Array[PositionFinancing])
}

ResetResettablePLTransaction is an application/json object with the following Schema:

{
    # 
    # The Transaction’s Identifier.
    # 
    id : (TransactionID),

    # 
    # The date/time when the Transaction was created.
    # 
    time : (DateTime),

    # 
    # The ID of the user that initiated the creation of the Transaction.
    # 
    userID : (integer),

    # 
    # The ID of the Account the Transaction was created for.
    # 
    accountID : (AccountID),

    # 
    # The ID of the “batch” that the Transaction belongs to. Transactions in
    # the same batch are applied to the Account simultaneously.
    # 
    batchID : (TransactionID),

    # 
    # The Request ID of the request which generated the transaction.
    # 
    requestID : (RequestID),

    # 
    # The Type of the Transaction. Always set to “RESET_RESETTABLE_PL” for a
    # ResetResettablePLTransaction.
    # 
    type : (TransactionType, default=RESET_RESETTABLE_PL)
}

Transaction-related Definitions

Type string
Format String representation of the numerical OANDA-assigned TransactionID
Example 1523

Value Description
CREATE Account Create Transaction
CLOSE Account Close Transaction
REOPEN Account Reopen Transaction
CLIENT_CONFIGURE Client Configuration Transaction
CLIENT_CONFIGURE_REJECT Client Configuration Reject Transaction
TRANSFER_FUNDS Transfer Funds Transaction
TRANSFER_FUNDS_REJECT Transfer Funds Reject Transaction
MARKET_ORDER Market Order Transaction
MARKET_ORDER_REJECT Market Order Reject Transaction
LIMIT_ORDER Limit Order Transaction
LIMIT_ORDER_REJECT Limit Order Reject Transaction
STOP_ORDER Stop Order Transaction
STOP_ORDER_REJECT Stop Order Reject Transaction
MARKET_IF_TOUCHED_ORDER Market if Touched Order Transaction
MARKET_IF_TOUCHED_ORDER_REJECT Market if Touched Order Reject Transaction
TAKE_PROFIT_ORDER Take Profit Order Transaction
TAKE_PROFIT_ORDER_REJECT Take Profit Order Reject Transaction
STOP_LOSS_ORDER Stop Loss Order Transaction
STOP_LOSS_ORDER_REJECT Stop Loss Order Reject Transaction
TRAILING_STOP_LOSS_ORDER Trailing Stop Loss Order Transaction
TRAILING_STOP_LOSS_ORDER_REJECT Trailing Stop Loss Order Reject Transaction
ORDER_FILL Order Fill Transaction
ORDER_CANCEL Order Cancel Transaction
ORDER_CANCEL_REJECT Order Cancel Reject Transaction
ORDER_CLIENT_EXTENSIONS_MODIFY Order Client Extensions Modify Transaction
ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT Order Client Extensions Modify Reject Transaction
TRADE_CLIENT_EXTENSIONS_MODIFY Trade Client Extensions Modify Transaction
TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT Trade Client Extensions Modify Reject Transaction
MARGIN_CALL_ENTER Margin Call Enter Transaction
MARGIN_CALL_EXTEND Margin Call Extend Transaction
MARGIN_CALL_EXIT Margin Call Exit Transaction
DELAYED_TRADE_CLOSURE Delayed Trade Closure Transaction
DAILY_FINANCING Daily Financing Transaction
RESET_RESETTABLE_PL Reset Resettable PL Transaction

Value Description
CLIENT_FUNDING The client has initiated a funds transfer
ACCOUNT_TRANSFER Funds are being transfered between two Accounts.
DIVISION_MIGRATION Funds are being transfered as part of a Division migration
SITE_MIGRATION Funds are being transfered as part of a Site migration
ADJUSTMENT Funds are being transfered as part of an Account adjustment

Value Description
CLIENT_ORDER The Market Order was created at the request of a client
TRADE_CLOSE The Market Order was created to close a Trade at the request of a client
POSITION_CLOSEOUT The Market Order was created to close a Position at the request of a client
MARGIN_CLOSEOUT The Market Order was created as part of a Margin Closeout
DELAYED_TRADE_CLOSE The Market Order was created to close a trade marked for delayed closure

Value Description
CLIENT_ORDER The Limit Order was initiated at the request of a client
REPLACEMENT The Limit Order was initiated as a replacement for an existing Order

Value Description
CLIENT_ORDER The Stop Order was initiated at the request of a client
REPLACEMENT The Stop Order was initiated as a replacement for an existing Order

Value Description
CLIENT_ORDER The Market-if-touched Order was initiated at the request of a client
REPLACEMENT The Market-if-touched Order was initiated as a replacement for an existing Order

Value Description
CLIENT_ORDER The Take Profit Order was initiated at the request of a client
REPLACEMENT The Take Profit Order was initiated as a replacement for an existing Order
ON_FILL The Take Profit Order was initiated automatically when an Order was filled that opened a new Trade requiring a Take Profit Order.

Value Description
CLIENT_ORDER The Stop Loss Order was initiated at the request of a client
REPLACEMENT The Stop Loss Order was initiated as a replacement for an existing Order
ON_FILL The Stop Loss Order was initiated automatically when an Order was filled that opened a new Trade requiring a Stop Loss Order.

Value Description
CLIENT_ORDER The Trailing Stop Loss Order was initiated at the request of a client
REPLACEMENT The Trailing Stop Loss Order was initiated as a replacement for an existing Order
ON_FILL The Trailing Stop Loss Order was initiated automatically when an Order was filled that opened a new Trade requiring a Trailing Stop Loss Order.

Value Description
LIMIT_ORDER The Order filled was a Limit Order
STOP_ORDER The Order filled was a Stop Order
MARKET_IF_TOUCHED_ORDER The Order filled was a Market-if-touched Order
TAKE_PROFIT_ORDER The Order filled was a Take Profit Order
STOP_LOSS_ORDER The Order filled was a Stop Loss Order
TRAILING_STOP_LOSS_ORDER The Order filled was a Trailing Stop Loss Order
MARKET_ORDER The Order filled was a Market Order
MARKET_ORDER_TRADE_CLOSE The Order filled was a Market Order used to explicitly close a Trade
MARKET_ORDER_POSITION_CLOSEOUT The Order filled was a Market Order used to explicitly close a Position
MARKET_ORDER_MARGIN_CLOSEOUT The Order filled was a Market Order used for a Margin Closeout
MARKET_ORDER_DELAYED_TRADE_CLOSE The Order filled was a Market Order used for a delayed Trade close

Value Description
INTERNAL_SERVER_ERROR The Order was cancelled because at the time of filling, an unexpected internal server error occurred.
ACCOUNT_LOCKED The Order was cancelled because at the time of filling the account was locked.
ACCOUNT_NEW_POSITIONS_LOCKED The order was to be filled, however the account is configured to not allow new positions to be created.
ACCOUNT_ORDER_CREATION_LOCKED Filling the Order wasn’t possible because it required the creation of a dependent Order and the Account is locked for Order creation.
ACCOUNT_ORDER_FILL_LOCKED Filling the Order was not possible because the Account is locked for filling Orders.
CLIENT_REQUEST The Order was cancelled explicitly at the request of the client.
MIGRATION The Order cancelled because it is being migrated to another account.
MARKET_HALTED Filling the Order wasn’t possible because the Order’s instrument was halted.
LINKED_TRADE_CLOSED The Order is linked to an open Trade that was closed.
TIME_IN_FORCE_EXPIRED The time in force specified for this order has passed.
INSUFFICIENT_MARGIN Filling the Order wasn’t possible because the Account had insufficient margin.
FIFO_VIOLATION Filling the Order would have resulted in a a FIFO violation.
BOUNDS_VIOLATION Filling the Order would have violated the Order’s price bound.
CLIENT_REQUEST_REPLACED The Order was cancelled for replacement at the request of the client.
INSUFFICIENT_LIQUIDITY Filling the Order wasn’t possible because enough liquidity available.
TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_IN_PAST Filling the Order would have resulted in the creation of a Take Profit Order with a GTD time in the past.
TAKE_PROFIT_ON_FILL_LOSS Filling the Order would result in the creation of a Take Profit Order that would have been filled immediately, closing the new Trade at a loss.
LOSING_TAKE_PROFIT Filling the Order would result in the creation of a Take Profit Loss Order that would close the new Trade at a loss when filled.
STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST Filling the Order would have resulted in the creation of a Stop Loss Order with a GTD time in the past.
STOP_LOSS_ON_FILL_LOSS Filling the Order would result in the creation of a Stop Loss Order that would have been filled immediately, closing the new Trade at a loss.
TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST Filling the Order would have resulted in the creation of a Trailing Stop Loss Order with a GTD time in the past.
CLIENT_TRADE_ID_ALREADY_EXISTS Filling the Order would result in the creation of a new Open Trade with a client Trade ID already in use.
POSITION_CLOSEOUT_FAILED Closing out a position wasn’t fully possible.
OPEN_TRADES_ALLOWED_EXCEEDED Filling the Order would cause the maximum open trades allowed for the Account to be exceeded.
PENDING_ORDERS_ALLOWED_EXCEEDED Filling the Order would have resulted in exceeding the number of pending Orders allowed for the Account.
TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS Filling the Order would have resulted in the creation of a Take Profit Order with a client Order ID that is already in use.
STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS Filling the Order would have resulted in the creation of a Stop Loss Order with a client Order ID that is already in use.
TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS Filling the Order would have resulted in the creation of a Trailing Stop Loss Order with a client Order ID that is already in use.
POSITION_SIZE_EXCEEDED Filling the Order would have resulted in the Account’s maximum position size limit being exceeded for the Order’s instrument.

Type string
Example my_order_id

Type string
Example client_tag_1

Type string
Example This is a client comment

ClientExtensions is an application/json object with the following Schema:

{
    # 
    # The Client ID of the Order/Trade
    # 
    id : (ClientID),

    # 
    # A tag associated with the Order/Trade
    # 
    tag : (ClientTag),

    # 
    # A comment associated with the Order/Trade
    # 
    comment : (ClientComment)
}

TakeProfitDetails is an application/json object with the following Schema:

{
    # 
    # The price that the Take Profit Order will be triggered at.
    # 
    price : (PriceValue),

    # 
    # The time in force for the created Take Profit Order. This may only be
    # GTC, GTD or GFD.
    # 
    timeInForce : (TimeInForce, default=GTC),

    # 
    # The date when the Take Profit Order will be cancelled on if timeInForce
    # is GTD.
    # 
    gtdTime : (DateTime),

    # 
    # The Client Extensions to add to the Take Profit Order when created.
    # 
    clientExtensions : (ClientExtensions)
}

StopLossDetails is an application/json object with the following Schema:

{
    # 
    # The price that the Stop Loss Order will be triggered at.
    # 
    price : (PriceValue),

    # 
    # The time in force for the created Stop Loss Order. This may only be GTC,
    # GTD or GFD.
    # 
    timeInForce : (TimeInForce, default=GTC),

    # 
    # The date when the Stop Loss Order will be cancelled on if timeInForce is
    # GTD.
    # 
    gtdTime : (DateTime),

    # 
    # The Client Extensions to add to the Stop Loss Order when created.
    # 
    clientExtensions : (ClientExtensions)
}

TrailingStopLossDetails is an application/json object with the following Schema:

{
    # 
    # The distance (in price units) from the Trade’s fill price that the
    # Trailing Stop Loss Order will be triggered at.
    # 
    distance : (PriceValue),

    # 
    # The time in force for the created Trailing Stop Loss Order. This may only
    # be GTC, GTD or GFD.
    # 
    timeInForce : (TimeInForce, default=GTC),

    # 
    # The date when the Trailing Stop Loss Order will be cancelled on if
    # timeInForce is GTD.
    # 
    gtdTime : (DateTime),

    # 
    # The Client Extensions to add to the Trailing Stop Loss Order when
    # created.
    # 
    clientExtensions : (ClientExtensions)
}

TradeOpen is an application/json object with the following Schema:

{
    # 
    # The ID of the Trade that was opened
    # 
    tradeID : (TradeID),

    # 
    # The number of units opened by the Trade
    # 
    units : (DecimalNumber),

    # 
    # The client extensions for the newly opened Trade
    # 
    clientExtensions : (ClientExtensions)
}

TradeReduce is an application/json object with the following Schema:

{
    # 
    # The ID of the Trade that was reduced or closed
    # 
    tradeID : (TradeID),

    # 
    # The number of units that the Trade was reduced by
    # 
    units : (DecimalNumber),

    # 
    # The PL realized when reducing the Trade
    # 
    realizedPL : (AccountUnits),

    # 
    # The financing paid/collected when reducing the Trade
    # 
    financing : (AccountUnits)
}

MarketOrderTradeClose is an application/json object with the following Schema:

{
    # 
    # The ID of the Trade requested to be closed
    # 
    tradeID : (TradeID),

    # 
    # The client ID of the Trade requested to be closed
    # 
    clientTradeID : (string),

    # 
    # Indication of how much of the Trade to close. Either “ALL”, or a
    # DecimalNumber reflection a partial close of the Trade.
    # 
    units : (string)
}

MarketOrderMarginCloseout is an application/json object with the following Schema:

{
    # 
    # The reason the Market Order was created to perform a margin closeout
    # 
    reason : (MarketOrderMarginCloseoutReason)
}

Value Description
MARGIN_CHECK_VIOLATION Trade closures resulted from violating OANDA’s margin policy
REGULATORY_MARGIN_CALL_VIOLATION Trade closures came from a margin closeout event resulting from regulatory conditions placed on the Account’s margin call

MarketOrderDelayedTradeClose is an application/json object with the following Schema:

{
    # 
    # The ID of the Trade being closed
    # 
    tradeID : (TradeID),

    # 
    # The Client ID of the Trade being closed
    # 
    clientTradeID : (TradeID),

    # 
    # The Transaction ID of the DelayedTradeClosure transaction to which this
    # Delayed Trade Close belongs to
    # 
    sourceTransactionID : (TransactionID)
}

MarketOrderPositionCloseout is an application/json object with the following Schema:

{
    # 
    # The instrument of the Position being closed out.
    # 
    instrument : (InstrumentName),

    # 
    # Indication of how much of the Position to close. Either “ALL”, or a
    # DecimalNumber reflection a partial close of the Trade. The DecimalNumber
    # must always be positive, and represent a number that doesn’t exceed the
    # absolute size of the Position.
    # 
    units : (string)
}

VWAPReceipt is an application/json object with the following Schema:

{
    # 
    # The number of units filled
    # 
    units : (DecimalNumber),

    # 
    # The price at which the units were filled
    # 
    price : (PriceValue)
}

LiquidityRegenerationSchedule is an application/json object with the following Schema:

{
    # 
    # The steps in the Liquidity Regeneration Schedule
    # 
    steps : (Array[LiquidityRegenerationScheduleStep])
}

LiquidityRegenerationScheduleStep is an application/json object with the following Schema:

{
    # 
    # The timestamp of the schedule step.
    # 
    timestamp : (DateTime),

    # 
    # The amount of bid liquidity used at this step in the schedule.
    # 
    bidLiquidityUsed : (DecimalNumber),

    # 
    # The amount of ask liquidity used at this step in the schedule.
    # 
    askLiquidityUsed : (DecimalNumber)
}

OpenTradeFinancing is an application/json object with the following Schema:

{
    # 
    # The ID of the Trade that financing is being paid/collected for.
    # 
    tradeID : (TradeID),

    # 
    # The amount of financing paid/collected for the Trade.
    # 
    financing : (AccountUnits)
}

PositionFinancing is an application/json object with the following Schema:

{
    # 
    # The instrument of the Position that financing is being paid/collected
    # for.
    # 
    instrument : (InstrumentName),

    # 
    # The amount of financing paid/collected for the Position.
    # 
    financing : (AccountUnits),

    # 
    # The financing paid/collecte for each open Trade within the Position.
    # 
    openTradeFinancings : (Array[OpenTradeFinancing])
}

Type string

Value Description
INTERNAL_SERVER_ERROR An unexpected internal server error has occurred
INSTRUMENT_PRICE_UNKNOWN The system was unable to determine the current price for the Order’s instrument
ACCOUNT_NOT_ACTIVE The Account is not active
ACCOUNT_LOCKED The Account is locked
ACCOUNT_ORDER_CREATION_LOCKED The Account is locked for Order creation
ACCOUNT_CONFIGURATION_LOCKED The Account is locked for configuration
ACCOUNT_DEPOSIT_LOCKED The Account is locked for deposits
ACCOUNT_WITHDRAWAL_LOCKED The Account is locked for withdrawals
ACCOUNT_ORDER_CANCEL_LOCKED The Account is locked for Order cancellation
INSTRUMENT_NOT_TRADEABLE The instrument specified is not tradeable by the Account
PENDING_ORDERS_ALLOWED_EXCEEDED Creating the Order would result in the maximum number of allowed pending Orders being exceeded
ORDER_ID_UNSPECIFIED Neither the Order ID nor client Order ID are specified
ORDER_DOESNT_EXIST The Order specified does not exist
ORDER_IDENTIFIER_INCONSISTENCY The Order ID and client Order ID specified do not identify the same Order
TRADE_ID_UNSPECIFIED Neither the Trade ID nor client Trade ID are specified
TRADE_DOESNT_EXIST The Trade specified does not exist
TRADE_IDENTIFIER_INCONSISTENCY The Trade ID and client Trade ID specified do not identify the same Trade
INSTRUMENT_MISSING Order instrument has not been specified
INSTRUMENT_UNKNOWN The instrument specified is unknown
UNITS_MISSING Order units have not been not specified
UNITS_INVALID Order units specified are invalid
UNITS_PRECISION_EXCEEDED The units specified contain more precision than is allowed for the Order’s instrument
UNITS_LIMIT_EXCEEDED The units specified exceeds the maximum number of units allowed
UNITS_MIMIMUM_NOT_MET The units specified is less than the minimum number of units required
PRICE_MISSING The price has not been specified
PRICE_INVALID The price specifed is invalid
PRICE_PRECISION_EXCEEDED The price specified contains more precision than is allowed for the instrument
PRICE_DISTANCE_MISSING The price distance has not been specified
PRICE_DISTANCE_INVALID The price distance specifed is invalid
PRICE_DISTANCE_PRECISION_EXCEEDED The price distance specified contains more precision than is allowed for the instrument
PRICE_DISTANCE_MAXIMUM_EXCEEDED The price distance exceeds that maximum allowed amount
PRICE_DISTANCE_MINIMUM_NOT_MET The price distance does not meet the minimum allowed amount
TIME_IN_FORCE_MISSING The TimeInForce field has not been specified
TIME_IN_FORCE_INVALID The TimeInForce specified is invalid
TIME_IN_FORCE_GTD_TIMESTAMP_MISSING The TimeInForce is GTD but no GTD timestamp is provided
TIME_IN_FORCE_GTD_TIMESTAMP_IN_PAST The TimeInForce is GTD but the GTD timestamp is in the past
PRICE_BOUND_INVALID The price bound specified is invalid
PRICE_BOUND_PRECISION_EXCEEDED The price bound specified contains more precision than is allowed for the Order’s instrument
ORDERS_ON_FILL_DUPLICATE_CLIENT_ORDER_IDS Multiple Orders on fill share the same client Order ID
TRADE_ON_FILL_CLIENT_EXTENSIONS_NOT_SUPPORTED The Order does not support Trade on fill client extensions because it cannot create a new Trade
CLIENT_ORDER_ID_INVALID The client Order ID specified is invalid
CLIENT_ORDER_ID_ALREADY_EXISTS The client Order ID specified is already assigned to another pending Order
CLIENT_ORDER_TAG_INVALID The client Order tag specified is invalid
CLIENT_ORDER_COMMENT_INVALID The client Order comment specified is invalid
CLIENT_TRADE_ID_INVALID The client Trade ID specified is invalid
CLIENT_TRADE_ID_ALREADY_EXISTS The client Trade ID specifed is already assigned to another open Trade
CLIENT_TRADE_TAG_INVALID The client Trade tag specified is invalid
CLIENT_TRADE_COMMENT_INVALID The client Trade comment is invalid
ORDER_FILL_POSITION_ACTION_MISSING The OrderFillPositionAction field has not been specified
ORDER_FILL_POSITION_ACTION_INVALID The OrderFillPositionAction specified is invalid
TRIGGER_CONDITION_MISSING The TriggerCondition field has not been specified
TRIGGER_CONDITION_INVALID The TriggerCondition specified is invalid
ORDER_PARTIAL_FILL_OPTION_MISSING The OrderFillPositionAction field has not been specified
ORDER_PARTIAL_FILL_OPTION_INVALID The OrderFillPositionAction specified is invalid.
INVALID_REISSUE_IMMEDIATE_PARTIAL_FILL When attempting to reissue an order (currently only a MarketIfTouched) that was immediately partially filled, it is not possible to create a correct pending Order.
TAKE_PROFIT_ORDER_ALREADY_EXISTS A Take Profit Order for the specified Trade already exists
TAKE_PROFIT_ON_FILL_PRICE_MISSING The Take Profit on fill specified does not provide a price
TAKE_PROFIT_ON_FILL_PRICE_INVALID The Take Profit on fill specified contains an invalid price
TAKE_PROFIT_ON_FILL_PRICE_PRECISION_EXCEEDED The Take Profit on fill specified contains a price with more precision than is allowed by the Order’s instrument
TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_MISSING The Take Profit on fill specified does not provide a TimeInForce
TAKE_PROFIT_ON_FILL_TIME_IN_FORCE_INVALID The Take Profit on fill specifies an invalid TimeInForce
TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_MISSING The Take Profit on fill specifies a GTD TimeInForce but does not provide a GTD timestamp
TAKE_PROFIT_ON_FILL_GTD_TIMESTAMP_IN_PAST The Take Profit on fill specifies a GTD timestamp that is in the past
TAKE_PROFIT_ON_FILL_CLIENT_ORDER_ID_INVALID The Take Profit on fill client Order ID specified is invalid
TAKE_PROFIT_ON_FILL_CLIENT_ORDER_TAG_INVALID The Take Profit on fill client Order tag specified is invalid
TAKE_PROFIT_ON_FILL_CLIENT_ORDER_COMMENT_INVALID The Take Profit on fill client Order comment specified is invalid
TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_MISSING The Take Profit on fill specified does not provide a TriggerCondition
TAKE_PROFIT_ON_FILL_TRIGGER_CONDITION_INVALID The Take Profit on fill specifies an invalid TriggerCondition
STOP_LOSS_ORDER_ALREADY_EXISTS A Stop Loss Order for the specified Trade already exists
STOP_LOSS_ON_FILL_PRICE_MISSING The Stop Loss on fill specified does not provide a price
STOP_LOSS_ON_FILL_PRICE_INVALID The Stop Loss on fill specifies an invalid price
STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED The Stop Loss on fill specifies a price with more precision than is allowed by the Order’s instrument
STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING The Stop Loss on fill specified does not provide a TimeInForce
STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID The Stop Loss on fill specifies an invalid TimeInForce
STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING The Stop Loss on fill specifies a GTD TimeInForce but does not provide a GTD timestamp
STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST The Stop Loss on fill specifies a GTD timestamp that is in the past
STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID The Stop Loss on fill client Order ID specified is invalid
STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID The Stop Loss on fill client Order tag specified is invalid
STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID The Stop Loss on fill client Order comment specified is invalid
STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING The Stop Loss on fill specified does not provide a TriggerCondition
STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID The Stop Loss on fill specifies an invalid TriggerCondition
TRAILING_STOP_LOSS_ORDER_ALREADY_EXISTS A Trailing Stop Loss Order for the specified Trade already exists
TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MISSING The Trailing Stop Loss on fill specified does not provide a distance
TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_INVALID The Trailing Stop Loss on fill distance is invalid
TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_PRECISION_EXCEEDED The Trailing Stop Loss on fill distance contains more precision than is allowed by the instrument
TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED The Trailing Stop Loss on fill price distance exceeds the maximum allowed amount
TRAILING_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MINIMUM_NOT_MET The Trailing Stop Loss on fill price distance does not meet the minimum allowed amount
TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING The Trailing Stop Loss on fill specified does not provide a TimeInForce
TRAILING_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID The Trailing Stop Loss on fill specifies an invalid TimeInForce
TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING The Trailing Stop Loss on fill TimeInForce is specified as GTD but no GTD timestamp is provided
TRAILING_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST The Trailing Stop Loss on fill GTD timestamp is in the past
TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID The Trailing Stop Loss on fill client Order ID specified is invalid
TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID The Trailing Stop Loss on fill client Order tag specified is invalid
TRAILING_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID The Trailing Stop Loss on fill client Order comment specified is invalid
TRAILING_STOP_LOSS_ORDERS_NOT_SUPPORTED A client attempted to create either a Trailing Stop Loss order or an order with a Trailing Stop Loss On Fill specified, which may not yet be supported.
TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING The Trailing Stop Loss on fill specified does not provide a TriggerCondition
TRAILING_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID The Tailing Stop Loss on fill specifies an invalid TriggerCondition
CLOSE_TRADE_TYPE_MISSING The request to close a Trade does not specify a full or partial close
CLOSE_TRADE_PARTIAL_UNITS_MISSING The request to close a Trade partially did not specify the number of units to close
CLOSE_TRADE_UNITS_EXCEED_TRADE_SIZE The request to partially close a Trade specifies a number of units that exceeds the current size of the given Trade
CLOSEOUT_POSITION_DOESNT_EXIST The Position requested to be closed out does not exist
CLOSEOUT_POSITION_INCOMPLETE_SPECIFICATION The request to closeout a Position was specified incompletely
CLOSEOUT_POSITION_UNITS_EXCEED_POSITION_SIZE A partial Position closeout request specifies a number of units that exceeds the current Position
CLOSEOUT_POSITION_REJECT The request to closeout a Position could not be fully satisfied
CLOSEOUT_POSITION_PARTIAL_UNITS_MISSING The request to partially closeout a Position did not specify the number of units to close.
MARKUP_GROUP_ID_INVALID The markup group ID provided is invalid
POSITION_AGGREGATION_MODE_INVALID The PositionAggregationMode provided is not supported/valid.
ADMIN_CONFIGURE_DATA_MISSING No configuration parameters provided
MARGIN_RATE_INVALID The margin rate provided is invalid
MARGIN_RATE_WOULD_TRIGGER_CLOSEOUT The margin rate provided would cause an immediate margin closeout
ALIAS_INVALID The account alias string provided is invalid
CLIENT_CONFIGURE_DATA_MISSING No configuration parameters provided
MARGIN_RATE_WOULD_TRIGGER_MARGIN_CALL The margin rate provided would cause the Account to enter a margin call state.
AMOUNT_INVALID Funding is not possible because the requested transfer amount is invalid
INSUFFICIENT_FUNDS The Account does not have sufficient balance to complete the funding request
AMOUNT_MISSING Funding amount has not been specified
FUNDING_REASON_MISSING Funding reason has not been specified
CLIENT_EXTENSIONS_DATA_MISSING Neither Order nor Trade on Fill client extensions were provided for modification
REPLACING_ORDER_INVALID The Order to be replaced has a different type than the replacing Order.
REPLACING_TRADE_ID_INVALID The replacing Order refers to a different Trade than the Order that is being replaced.

Value Description
ORDER Order-related Transactions. These are the Transactions that create, cancel, fill or trigger Orders
FUNDING Funding-related Transactions
ADMIN Administrative Transactions
CREATE Account Create Transaction
CLOSE Account Close Transaction
REOPEN Account Reopen Transaction
CLIENT_CONFIGURE Client Configuration Transaction
CLIENT_CONFIGURE_REJECT Client Configuration Reject Transaction
TRANSFER_FUNDS Transfer Funds Transaction
TRANSFER_FUNDS_REJECT Transfer Funds Reject Transaction
MARKET_ORDER Market Order Transaction
MARKET_ORDER_REJECT Market Order Reject Transaction
LIMIT_ORDER Limit Order Transaction
LIMIT_ORDER_REJECT Limit Order Reject Transaction
STOP_ORDER Stop Order Transaction
STOP_ORDER_REJECT Stop Order Reject Transaction
MARKET_IF_TOUCHED_ORDER Market if Touched Order Transaction
MARKET_IF_TOUCHED_ORDER_REJECT Market if Touched Order Reject Transaction
TAKE_PROFIT_ORDER Take Profit Order Transaction
TAKE_PROFIT_ORDER_REJECT Take Profit Order Reject Transaction
STOP_LOSS_ORDER Stop Loss Order Transaction
STOP_LOSS_ORDER_REJECT Stop Loss Order Reject Transaction
TRAILING_STOP_LOSS_ORDER Trailing Stop Loss Order Transaction
TRAILING_STOP_LOSS_ORDER_REJECT Trailing Stop Loss Order Reject Transaction
ONE_CANCELS_ALL_ORDER One Cancels All Order Transaction
ONE_CANCELS_ALL_ORDER_REJECT One Cancels All Order Reject Transaction
ONE_CANCELS_ALL_ORDER_TRIGGERED One Cancels All Order Trigger Transaction
ORDER_FILL Order Fill Transaction
ORDER_CANCEL Order Cancel Transaction
ORDER_CANCEL_REJECT Order Cancel Reject Transaction
ORDER_CLIENT_EXTENSIONS_MODIFY Order Client Extensions Modify Transaction
ORDER_CLIENT_EXTENSIONS_MODIFY_REJECT Order Client Extensions Modify Reject Transaction
TRADE_CLIENT_EXTENSIONS_MODIFY Trade Client Extensions Modify Transaction
TRADE_CLIENT_EXTENSIONS_MODIFY_REJECT Trade Client Extensions Modify Reject Transaction
MARGIN_CALL_ENTER Margin Call Enter Transaction
MARGIN_CALL_EXTEND Margin Call Extend Transaction
MARGIN_CALL_EXIT Margin Call Exit Transaction
DELAYED_TRADE_CLOSURE Delayed Trade Closure Transaction
DAILY_FINANCING Daily Financing Transaction
RESET_RESETTABLE_PL Reset Resettable PL Transaction

TransactionHeartbeat is an application/json object with the following Schema:

{
    # 
    # The string “HEARTBEAT”
    # 
    type : (string, default=HEARTBEAT),

    # 
    # The ID of the most recent Transaction created for the Account
    # 
    lastTransactionID : (TransactionID),

    # 
    # The date/time when the TransactionHeartbeat was created.
    # 
    time : (DateTime)
}