Transaction Definitions


Transactions

The specification of all Transactions supported by the platform.

Implemented by: OrderFillTransaction, OrderCancelTransaction, OrderCancelRejectTransaction, OrderClientExtensionsModifyTransaction, OrderClientExtensionsModifyRejectTransaction, CreateTransaction, CloseTransaction, ReopenTransaction, ClientConfigureTransaction, ClientConfigureRejectTransaction, TransferFundsTransaction, TransferFundsRejectTransaction, MarketOrderTransaction, MarketOrderRejectTransaction, FixedPriceOrderTransaction, LimitOrderTransaction, LimitOrderRejectTransaction, StopOrderTransaction, StopOrderRejectTransaction, MarketIfTouchedOrderTransaction, MarketIfTouchedOrderRejectTransaction, TakeProfitOrderTransaction, TakeProfitOrderRejectTransaction, StopLossOrderTransaction, StopLossOrderRejectTransaction, GuaranteedStopLossOrderTransaction, GuaranteedStopLossOrderRejectTransaction, TrailingStopLossOrderTransaction, TrailingStopLossOrderRejectTransaction, TradeClientExtensionsModifyTransaction, TradeClientExtensionsModifyRejectTransaction, MarginCallEnterTransaction, MarginCallExtendTransaction, MarginCallExitTransaction, DelayedTradeClosureTransaction, DailyFinancingTransaction, DividendAdjustmentTransaction, 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 positive
    # 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),

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

    # 
    # 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 positive
    # 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),

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

    # 
    # 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)
}

FixedPriceOrderTransaction 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 “FIXED_PRICE_ORDER” in a
    # FixedPriceOrderTransaction.
    # 
    type : (TransactionType, default=FIXED_PRICE_ORDER),

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

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

    # 
    # The price specified for the Fixed Price Order. This price is the exact
    # price that the Fixed Price Order will be filled at.
    # 
    price : (PriceValue, required),

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

    # 
    # The state that the trade resulting from the Fixed Price Order should be
    # set to.
    # 
    tradeState : (string, required),

    # 
    # The reason that the Fixed Price Order was created
    # 
    reason : (FixedPriceOrderReason),

    # 
    # The client extensions for the Fixed Price Order.
    # 
    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),

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

    # 
    # 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)
}

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 positive 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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    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),

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

    # 
    # 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 positive 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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    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),

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

    # 
    # 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 positive 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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    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),

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

    # 
    # 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 positive 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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    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),

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

    # 
    # 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
    # positive 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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    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),

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

    # 
    # 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
    # positive 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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    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),

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

    # 
    # 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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    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 Stop Loss Order. The associated
    # Trade will be closed by a market price that is equal to or worse than
    # this threshold.
    # 
    price : (PriceValue, required),

    # 
    # Specifies the distance (in price units) from the Account’s current price
    # to use as the Stop Loss Order price. If the Trade is short the
    # Instrument’s bid price is used, and for long Trades the ask is used.
    # 
    distance : (DecimalNumber),

    # 
    # 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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # Flag indicating that the Stop Loss Order is guaranteed. The default value
    # depends on the GuaranteedStopLossOrderMode of the account, if it is
    # REQUIRED, the default will be true, for DISABLED or ENABLED the default
    # is false.
    # 
    # 
    # Deprecated: Will be removed in a future API update.
    # 
    guaranteed : (boolean, deprecated),

    # 
    # The fee that will be charged if the Stop Loss Order is guaranteed and the
    # Order is filled at the guaranteed price. The value is determined at Order
    # creation time. It is in price units and is charged for each unit of the
    # Trade.
    # 
    # 
    # Deprecated: Will be removed in a future API update.
    # 
    guaranteedExecutionPremium : (DecimalNumber, deprecated),

    # 
    # 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 Stop Loss Order. The associated
    # Trade will be closed by a market price that is equal to or worse than
    # this threshold.
    # 
    price : (PriceValue, required),

    # 
    # Specifies the distance (in price units) from the Account’s current price
    # to use as the Stop Loss Order price. If the Trade is short the
    # Instrument’s bid price is used, and for long Trades the ask is used.
    # 
    distance : (DecimalNumber),

    # 
    # 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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # Flag indicating that the Stop Loss Order is guaranteed. The default value
    # depends on the GuaranteedStopLossOrderMode of the account, if it is
    # REQUIRED, the default will be true, for DISABLED or ENABLED the default
    # is false.
    # 
    # 
    # Deprecated: Will be removed in a future API update.
    # 
    guaranteed : (boolean, deprecated),

    # 
    # 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)
}

GuaranteedStopLossOrderTransaction 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 “GUARANTEED_STOP_LOSS_ORDER”
    # in a GuaranteedStopLossOrderTransaction.
    # 
    type : (TransactionType, default=GUARANTEED_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 Guaranteed Stop Loss Order. The
    # associated Trade will be closed at this price.
    # 
    price : (PriceValue, required),

    # 
    # Specifies the distance (in price units) from the Account’s current price
    # to use as the Guaranteed Stop Loss Order price. If the Trade is short the
    # Instrument’s bid price is used, and for long Trades the ask is used.
    # 
    distance : (DecimalNumber),

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

    # 
    # The date/time when the GuaranteedStopLoss 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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

    # 
    # The fee that will be charged if the Guaranteed Stop Loss Order is filled
    # at the guaranteed price. The value is determined at Order creation time.
    # It is in price units and is charged for each unit of the Trade.
    # 
    guaranteedExecutionPremium : (DecimalNumber),

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

    # 
    # 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)
}

GuaranteedStopLossOrderRejectTransaction 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
    # “GUARANTEED_STOP_LOSS_ORDER_REJECT” in a
    # GuaranteedStopLossOrderRejectTransaction.
    # 
    type : (TransactionType, default=GUARANTEED_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 Guaranteed Stop Loss Order. The
    # associated Trade will be closed at this price.
    # 
    price : (PriceValue, required),

    # 
    # Specifies the distance (in price units) from the Account’s current price
    # to use as the Guaranteed Stop Loss Order price. If the Trade is short the
    # Instrument’s bid price is used, and for long Trades the ask is used.
    # 
    distance : (DecimalNumber),

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

    # 
    # The date/time when the GuaranteedStopLoss 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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    triggerCondition : (OrderTriggerCondition, required, default=DEFAULT),

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

    # 
    # 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 (in price units) specified for the TrailingStopLoss
    # Order.
    # 
    distance : (DecimalNumber, 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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    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 (in price units) specified for the TrailingStopLoss
    # Order.
    # 
    distance : (DecimalNumber, 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. A special
    # restriction applies when creating a Guaranteed Stop Loss Order. In this
    # case the TriggerCondition value must either be “DEFAULT”, or the
    # “natural” trigger side “DEFAULT” results in. So for a Guaranteed Stop
    # Loss Order for a long trade valid values are “DEFAULT” and “BID”, and for
    # short trades “DEFAULT” and “ASK” are valid.
    # 
    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 OrderFill.
    # 
    units : (DecimalNumber),

    # 
    # This is the conversion factor in effect for the Account at the time of
    # the OrderFill for converting any gains realized in Instrument quote units
    # into units of the Account’s home currency.
    # 
    # 
    # Deprecated: Will be removed in a future API update.
    # 
    gainQuoteHomeConversionFactor : (DecimalNumber, deprecated),

    # 
    # This is the conversion factor in effect for the Account at the time of
    # the OrderFill for converting any losses realized in Instrument quote
    # units into units of the Account’s home currency.
    # 
    # 
    # Deprecated: Will be removed in a future API update.
    # 
    lossQuoteHomeConversionFactor : (DecimalNumber, deprecated),

    # 
    # The HomeConversionFactors in effect at the time of the OrderFill.
    # 
    homeConversionFactors : (HomeConversionFactors),

    # 
    # This field is now deprecated and should no longer be used. The individual
    # tradesClosed, tradeReduced and tradeOpened fields contain the
    # exact/official price each unit was filled at.
    # 
    # 
    # Deprecated: Will be removed in a future API update.
    # 
    price : (PriceValue, deprecated),

    # 
    # The price that all of the units of the OrderFill should have been filled
    # at, in the absence of guaranteed price execution. This factors in the
    # Account’s current ClientPrice, used liquidity and the units of the
    # OrderFill only. If no Trades were closed with their price clamped for
    # guaranteed stop loss enforcement, then this value will match the price
    # fields of each Trade opened, closed, and reduced, and they will all be
    # the exact same.
    # 
    fullVWAP : (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 profit or loss incurred when the Order was filled, in the
    # Instrument’s quote currency.
    # 
    quotePL : (DecimalNumber),

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

    # 
    # The financing paid or collected when the Order was filled, in the
    # Instrument’s base currency.
    # 
    baseFinancing : (DecimalNumber),

    # 
    # The financing paid or collected when the Order was filled, in the
    # Instrument’s quote currency.
    # 
    quoteFinancing : (DecimalNumber),

    # 
    # 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 total guaranteed execution fees charged for all Trades opened, closed
    # or reduced with guaranteed Stop Loss Orders.
    # 
    guaranteedExecutionFee : (AccountUnits),

    # 
    # The total guaranteed execution fees charged for all Trades opened, closed
    # or reduced with guaranteed Stop Loss Orders, expressed in the
    # Instrument’s quote currency.
    # 
    quoteGuaranteedExecutionFee : (DecimalNumber),

    # 
    # 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),

    # 
    # The half spread cost for the OrderFill, which is the sum of the
    # halfSpreadCost values in the tradeOpened, tradesClosed and tradeReduced
    # fields. This can be a positive or negative value and is represented in
    # the home currency of the Account.
    # 
    halfSpreadCost : (AccountUnits)
}

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 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
    # OrderClientExtensionsModifyTransaction.
    # 
    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. This field
    # is no longer in use moving forward and was replaced by
    # accountFinancingMode in individual positionFinancings since the financing
    # mode could differ between instruments.
    # 
    # 
    # Deprecated: Will be removed in a future API update.
    # 
    accountFinancingMode : (AccountFinancingMode, deprecated),

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

DividendAdjustmentTransaction 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 “DIVIDEND_ADJUSTMENT” for a
    # DividendAdjustmentTransaction.
    # 
    type : (TransactionType, default=DIVIDEND_ADJUSTMENT),

    # 
    # The name of the instrument for the dividendAdjustment transaction
    # 
    instrument : (InstrumentName),

    # 
    # The total dividend adjustment amount paid or collected in the Account’s
    # home currency for the Account as a result of applying the
    # DividendAdjustment Transaction. This is the sum of the dividend
    # adjustments paid/collected for each OpenTradeDividendAdjustment found
    # within the Transaction.
    # 
    dividendAdjustment : (AccountUnits),

    # 
    # The total dividend adjustment amount paid or collected in the
    # Instrument’s quote currency for the Account as a result of applying the
    # DividendAdjustment Transaction. This is the sum of the quote dividend
    # adjustments paid/collected for each OpenTradeDividendAdjustment found
    # within the Transaction.
    # 
    quoteDividendAdjustment : (DecimalNumber),

    # 
    # The HomeConversionFactors in effect at the time of the
    # DividendAdjustment.
    # 
    homeConversionFactors : (HomeConversionFactors),

    # 
    # The Account balance after applying the DividendAdjustment Transaction
    # 
    accountBalance : (AccountUnits),

    # 
    # The dividend adjustment payment/collection details for each open Trade,
    # within the Account, for which a dividend adjustment is to be paid or
    # collected.
    # 
    openTradeDividendAdjustments : (Array[OpenTradeDividendAdjustment])
}

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
FIXED_PRICE_ORDER Fixed Price Order 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
GUARANTEED_STOP_LOSS_ORDER Guaranteed Stop Loss Order Transaction
GUARANTEED_STOP_LOSS_ORDER_REJECT Guaranteed 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
DIVIDEND_ADJUSTMENT Dividend Adjustment Transaction
RESET_RESETTABLE_PL Reset Resettable PL Transaction

Value Description
CLIENT_FUNDING The client has initiated a funds transfer
ACCOUNT_TRANSFER Funds are being transferred between two Accounts.
DIVISION_MIGRATION Funds are being transferred as part of a Division migration
SITE_MIGRATION Funds are being transferred as part of a Site migration
ADJUSTMENT Funds are being transferred 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
PLATFORM_ACCOUNT_MIGRATION The Fixed Price Order was created as part of a platform account migration
TRADE_CLOSE_DIVISION_ACCOUNT_MIGRATION The Fixed Price Order was created to close a Trade as part of division account migration
TRADE_CLOSE_ADMINISTRATIVE_ACTION The Fixed Price Order was created to close a Trade administratively

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 Guaranteed Stop Loss Order was initiated at the request of a client
REPLACEMENT The Guaranteed Stop Loss Order was initiated as a replacement for an existing Order
ON_FILL The Guaranteed Stop Loss Order was initiated automatically when an Order was filled that opened a new Trade requiring a Guaranteed 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
GUARANTEED_STOP_LOSS_ORDER The Order filled was a Guaranteed 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
FIXED_PRICE_ORDER The Order filled was a Fixed Price Order
FIXED_PRICE_ORDER_PLATFORM_ACCOUNT_MIGRATION The Order filled was a Fixed Price Order created as part of a platform account migration
FIXED_PRICE_ORDER_DIVISION_ACCOUNT_MIGRATION The Order filled was a Fixed Price Order created to close a Trade as part of division account migration
FIXED_PRICE_ORDER_ADMINISTRATIVE_ACTION The Order filled was a Fixed Price Order created to close a Trade administratively

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.
DIVIDEND_ADJUSTMENT_REPLACED

The Order was cancelled for replacement with an adjusted fillPrice to accommodate for the price movement caused by a dividendAdjustment.
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.
STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED Filling the Order would result in the creation of a Stop Loss Order whose price would be zero or negative due to the specified distance.
STOP_LOSS_ON_FILL_REQUIRED Filling the Order would not result in the creation of Stop Loss Order, however the Account’s configuration requires that all Trades have a Stop Loss Order attached to them.
STOP_LOSS_ON_FILL_GUARANTEED_REQUIRED

Filling the Order would not result in the creation of a guaranteed Stop Loss Order, however the Account’s configuration requires that all Trades have a guaranteed Stop Loss Order attached to them.
STOP_LOSS_ON_FILL_GUARANTEED_NOT_ALLOWED

Filling the Order would result in the creation of a guaranteed Stop Loss Order, however the Account’s configuration does not allow guaranteed Stop Loss Orders.
STOP_LOSS_ON_FILL_GUARANTEED_MINIMUM_DISTANCE_NOT_MET

Filling the Order would result in the creation of a guaranteed Stop Loss Order with a distance smaller than the configured minimum distance.
STOP_LOSS_ON_FILL_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED Filling the Order would result in the creation of a guaranteed Stop Loss Order with trigger price and number of units that that violates the account’s guaranteed Stop Loss Order level restriction.
STOP_LOSS_ON_FILL_GUARANTEED_HEDGING_NOT_ALLOWED Filling the Order would result in the creation of a guaranteed Stop Loss Order for a hedged Trade, however the Account’s configuration does not allow guaranteed Stop Loss Orders for hedged Trades/Positions.
STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID Filling the Order would result in the creation of a Stop Loss Order whose TimeInForce value is invalid. A likely cause would be if the Account requires guaranteed stop loss orders and the TimeInForce value were not GTC.
STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID Filling the Order would result in the creation of a Stop Loss Order whose TriggerCondition value is invalid. A likely cause would be if the stop loss order is guaranteed and the TimeInForce is not TRIGGER_DEFAULT or TRIGGER_BID for a long trade, or not TRIGGER_DEFAULT or TRIGGER_ASK for a short trade.
GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST Filling the Order would have resulted in the creation of a Guaranteed Stop Loss Order with a GTD time in the past.
GUARANTEED_STOP_LOSS_ON_FILL_LOSS Filling the Order would result in the creation of a Guaranteed Stop Loss Order that would have been filled immediately, closing the new Trade at a loss.
GUARANTEED_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED Filling the Order would result in the creation of a Guaranteed Stop Loss Order whose price would be zero or negative due to the specified distance.
GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED Filling the Order would not result in the creation of a Guaranteed Stop Loss Order, however the Account’s configuration requires that all Trades have a Guaranteed Stop Loss Order attached to them.
GUARANTEED_STOP_LOSS_ON_FILL_NOT_ALLOWED Filling the Order would result in the creation of a Guaranteed Stop Loss Order, however the Account’s configuration does not allow Guaranteed Stop Loss Orders.
GUARANTEED_STOP_LOSS_ON_FILL_MINIMUM_DISTANCE_NOT_MET Filling the Order would result in the creation of a Guaranteed Stop Loss Order with a distance smaller than the configured minimum distance.
GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_VOLUME_EXCEEDED Filling the Order would result in the creation of a Guaranteed Stop Loss Order with trigger number of units that violates the account’s Guaranteed Stop Loss Order level restriction volume.
GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED Filling the Order would result in the creation of a Guaranteed Stop Loss Order with trigger price that violates the account’s Guaranteed Stop Loss Order level restriction price range.
GUARANTEED_STOP_LOSS_ON_FILL_HEDGING_NOT_ALLOWED Filling the Order would result in the creation of a Guaranteed Stop Loss Order for a hedged Trade, however the Account’s configuration does not allow Guaranteed Stop Loss Orders for hedged Trades/Positions.
GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID Filling the Order would result in the creation of a Guaranteed Stop Loss Order whose TimeInForce value is invalid. A likely cause would be if the Account requires guaranteed stop loss orders and the TimeInForce value were not GTC.
GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID Filling the Order would result in the creation of a Guaranteed Stop Loss Order whose TriggerCondition value is invalid. A likely cause would be the TimeInForce is not TRIGGER_DEFAULT or TRIGGER_BID for a long trade, or not TRIGGER_DEFAULT or TRIGGER_ASK for a short trade.
TAKE_PROFIT_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED Filling the Order would result in the creation of a Take Profit Order whose price would be zero or negative due to the specified distance.
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.
GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_ALREADY_EXISTS Filling the Order would have resulted in the creation of a Guaranteed 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.
HEDGING_GSLO_VIOLATION Filling the Order would result in the creation of a Trade, however there already exists an opposing (hedged) Trade that has a guaranteed Stop Loss Order attached to it. Guaranteed Stop Loss Orders cannot be combined with hedged positions.
ACCOUNT_POSITION_VALUE_LIMIT_EXCEEDED Filling the order would cause the maximum position value allowed for the account to be exceeded. The Order has been cancelled as a result.
INSTRUMENT_BID_REDUCE_ONLY Filling the order would require the creation of a short trade, however the instrument is configured such that orders being filled using bid prices can only reduce existing positions. New short positions cannot be created, but existing long positions may be reduced or closed.
INSTRUMENT_ASK_REDUCE_ONLY Filling the order would require the creation of a long trade, however the instrument is configured such that orders being filled using ask prices can only reduce existing positions. New long positions cannot be created, but existing short positions may be reduced or closed.
INSTRUMENT_BID_HALTED Filling the order would require using the bid, however the instrument is configured such that the bids are halted, and so no short orders may be filled.
INSTRUMENT_ASK_HALTED Filling the order would require using the ask, however the instrument is configured such that the asks are halted, and so no long orders may be filled.
STOP_LOSS_ON_FILL_GUARANTEED_BID_HALTED Filling the Order would result in the creation of a Guaranteed Stop Loss Order (GSLO). Since the trade is long the GSLO would be short, however the bid side is currently halted. GSLOs cannot be created in this situation.
STOP_LOSS_ON_FILL_GUARANTEED_ASK_HALTED Filling the Order would result in the creation of a Guaranteed Stop Loss Order (GSLO). Since the trade is short the GSLO would be long, however the ask side is currently halted. GSLOs cannot be created in this situation.
GUARANTEED_STOP_LOSS_ON_FILL_BID_HALTED Filling the Order would result in the creation of a Guaranteed Stop Loss Order (GSLO). Since the trade is long the GSLO would be short, however the bid side is currently halted. GSLOs cannot be created in this situation.
GUARANTEED_STOP_LOSS_ON_FILL_ASK_HALTED Filling the Order would result in the creation of a Guaranteed Stop Loss Order (GSLO). Since the trade is short the GSLO would be long, however the ask side is currently halted. GSLOs cannot be created in this situation.
FIFO_VIOLATION_SAFEGUARD_VIOLATION Filling the Order would have resulted in a new Trade that violates the FIFO violation safeguard constraints.
FIFO_VIOLATION_SAFEGUARD_PARTIAL_CLOSE_VIOLATION Filling the Order would have reduced an existing Trade such that the reduced Trade violates the FIFO violation safeguard constraints.
ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION The Orders on fill would be in violation of the risk management Order mutual exclusivity configuration specifying that only one risk management Order can be attached to a Trade.

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

{
    # 
    # The ID of the Trade for which the dividend adjustment is to be paid or
    # collected.
    # 
    tradeID : (TradeID),

    # 
    # The dividend adjustment amount to pay or collect for the Trade.
    # 
    dividendAdjustment : (AccountUnits),

    # 
    # The dividend adjustment amount to pay or collect for the Trade, in the
    # Instrument’s quote currency.
    # 
    quoteDividendAdjustment : (DecimalNumber)
}

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. Only one of
    # the price and distance fields may be specified.
    # 
    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. Only one of the
    # price and distance fields may be specified.
    # 
    price : (PriceValue),

    # 
    # Specifies the distance (in price units) from the Trade’s open price to
    # use as the Stop Loss Order price. Only one of the distance and price
    # fields may be specified.
    # 
    distance : (DecimalNumber),

    # 
    # 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),

    # 
    # Flag indicating that the price for the Stop Loss Order is guaranteed. The
    # default value depends on the GuaranteedStopLossOrderMode of the account,
    # if it is REQUIRED, the default will be true, for DISABLED or ENABLED the
    # default is false.
    # 
    # 
    # Deprecated: Will be removed in a future API update.
    # 
    guaranteed : (boolean, deprecated)
}

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

{
    # 
    # The price that the Guaranteed Stop Loss Order will be triggered at. Only
    # one of the price and distance fields may be specified.
    # 
    price : (PriceValue),

    # 
    # Specifies the distance (in price units) from the Trade’s open price to
    # use as the Guaranteed Stop Loss Order price. Only one of the distance and
    # price fields may be specified.
    # 
    distance : (DecimalNumber),

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

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

    # 
    # The Client Extensions to add to the Guaranteed 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 : (DecimalNumber),

    # 
    # 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 average price that the units were opened at.
    # 
    price : (PriceValue),

    # 
    # This is the fee charged for opening the trade if it has a guaranteed Stop
    # Loss Order attached to it.
    # 
    guaranteedExecutionFee : (AccountUnits),

    # 
    # This is the fee charged for opening the trade if it has a guaranteed Stop
    # Loss Order attached to it, expressed in the Instrument’s quote currency.
    # 
    quoteGuaranteedExecutionFee : (DecimalNumber),

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

    # 
    # The half spread cost for the trade open. This can be a positive or
    # negative value and is represented in the home currency of the Account.
    # 
    halfSpreadCost : (AccountUnits),

    # 
    # The margin required at the time the Trade was created. Note, this is the
    # ‘pure’ margin required, it is not the ‘effective’ margin used that
    # factors in the trade risk if a GSLO is attached to the trade.
    # 
    initialMarginRequired : (AccountUnits)
}

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 average price that the units were closed at. This price may be
    # clamped for guaranteed Stop Loss Orders.
    # 
    price : (PriceValue),

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

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

    # 
    # The base financing paid/collected when reducing the Trade
    # 
    baseFinancing : (DecimalNumber),

    # 
    # The quote financing paid/collected when reducing the Trade
    # 
    quoteFinancing : (DecimalNumber),

    # 
    # The financing rate in effect for the instrument used to calculate the
    # amount of financing paid/collected when reducing the Trade. This field
    # will only be set if the AccountFinancingMode at the time of the order
    # fill is SECOND_BY_SECOND_INSTRUMENT. The value is in decimal rather than
    # percentage points, e.g. 5% is represented as 0.05.
    # 
    financingRate : (DecimalNumber),

    # 
    # This is the fee that is charged for closing the Trade if it has a
    # guaranteed Stop Loss Order attached to it.
    # 
    guaranteedExecutionFee : (AccountUnits),

    # 
    # This is the fee that is charged for closing the Trade if it has a
    # guaranteed Stop Loss Order attached to it, expressed in the Instrument’s
    # quote currency.
    # 
    quoteGuaranteedExecutionFee : (DecimalNumber),

    # 
    # The half spread cost for the trade reduce/close. This can be a positive
    # or negative value and is represented in the home currency of the Account.
    # 
    halfSpreadCost : (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
REGULATORY_MARGIN_CHECK_VIOLATION Trade closures resulted from violating the margin policy imposed by regulatory requirements

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)
}

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),

    # 
    # The amount of financing paid/collected in the Instrument’s base currency
    # for the Trade.
    # 
    baseFinancing : (DecimalNumber),

    # 
    # The amount of financing paid/collected in the Instrument’s quote currency
    # for the Trade.
    # 
    quoteFinancing : (DecimalNumber),

    # 
    # The financing rate in effect for the instrument used to calculate the the
    # amount of financing paid/collected for the Trade. This field will only be
    # set if the AccountFinancingMode at the time of the daily financing is
    # DAILY_INSTRUMENT or SECOND_BY_SECOND_INSTRUMENT. The value is in decimal
    # rather than percentage points, e.g. 5% is represented as 0.05.
    # 
    financingRate : (DecimalNumber)
}

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 amount of base financing paid/collected for the Position.
    # 
    baseFinancing : (DecimalNumber),

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

    # 
    # The HomeConversionFactors in effect for the Position’s Instrument at the
    # time of the DailyFinancing.
    # 
    homeConversionFactors : (HomeConversionFactors),

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

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

Type string

Type string
Example my_request_id

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
INSUFFICIENT_MARGIN The Account had insufficient margin to perform the action specified. One possible reason for this is due to the creation or modification of a guaranteed StopLoss Order.
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_MINIMUM_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 specified 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 specified 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 specified 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.
ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION The Orders on fill would be in violation of the risk management Order mutual exclusivity configuration specifying that only one risk management Order can be attached to a Trade.
ORDERS_ON_FILL_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION The Orders on fill would be in violation of the risk management Order mutual exclusivity configuration specifying that if a GSLO is already attached to a Trade, no other risk management Order can be attached to a Trade.
TAKE_PROFIT_ORDER_ALREADY_EXISTS A Take Profit Order for the specified Trade already exists
TAKE_PROFIT_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD The Take Profit Order would cause the associated Trade to be in violation of the FIFO violation safeguard constraints.
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_ORDER_GUARANTEED_REQUIRED An attempt was made to to create a non-guaranteed stop loss order in an account that requires all stop loss orders to be guaranteed.
STOP_LOSS_ORDER_GUARANTEED_PRICE_WITHIN_SPREAD An attempt to create a guaranteed stop loss order with a price that is within the current tradeable spread.
STOP_LOSS_ORDER_GUARANTEED_NOT_ALLOWED An attempt was made to create a guaranteed Stop Loss Order, however the Account’s configuration does not allow guaranteed Stop Loss Orders.
STOP_LOSS_ORDER_GUARANTEED_HALTED_CREATE_VIOLATION An attempt was made to create a guaranteed Stop Loss Order when the market was halted.
STOP_LOSS_ORDER_GUARANTEED_HALTED_TIGHTEN_VIOLATION An attempt was made to re-create a guaranteed Stop Loss Order with a tighter fill price when the market was halted.
STOP_LOSS_ORDER_GUARANTEED_HEDGING_NOT_ALLOWED An attempt was made to create a guaranteed Stop Loss Order on a hedged Trade (ie there is an existing open Trade in the opposing direction), however the Account’s configuration does not allow guaranteed Stop Loss Orders for hedged Trades/Positions.
STOP_LOSS_ORDER_GUARANTEED_MINIMUM_DISTANCE_NOT_MET An attempt was made to create a guaranteed Stop Loss Order, however the distance between the current price and the trigger price does not meet the Account’s configured minimum Guaranteed Stop Loss distance.
STOP_LOSS_ORDER_NOT_CANCELABLE An attempt was made to cancel a Stop Loss Order, however the Account’s configuration requires every Trade have an associated Stop Loss Order.
STOP_LOSS_ORDER_NOT_REPLACEABLE An attempt was made to cancel and replace a Stop Loss Order, however the Account’s configuration prevents the modification of Stop Loss Orders.
STOP_LOSS_ORDER_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED An attempt was made to create a guaranteed Stop Loss Order, however doing so would exceed the Account’s configured guaranteed StopLoss Order level restriction volume.
STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED The Stop Loss Order request contains both the price and distance fields.
STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING The Stop Loss Order request contains neither the price nor distance fields.
STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD The Stop Loss Order would cause the associated Trade to be in violation of the FIFO violation safeguard constraints
STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION The Stop Loss Order would be in violation of the risk management Order mutual exclusivity configuration specifying that only one risk management order can be attached to a Trade.
STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION The Stop Loss Order would be in violation of the risk management Order mutual exclusivity configuration specifying that if a GSLO is already attached to a Trade, no other risk management Order can be attached to the same Trade.
STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER An attempt to create a pending Order was made with no Stop Loss Order on fill specified and the Account’s configuration requires that every Trade have an associated Stop Loss Order.
STOP_LOSS_ON_FILL_GUARANTEED_NOT_ALLOWED An attempt to create a pending Order was made with a Stop Loss Order on fill that was explicitly configured to be guaranteed, however the Account’s configuration does not allow guaranteed Stop Loss Orders.
STOP_LOSS_ON_FILL_GUARANTEED_REQUIRED An attempt to create a pending Order was made with a Stop Loss Order on fill that was explicitly configured to be not guaranteed, however the Account’s configuration requires guaranteed Stop Loss Orders.
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_GUARANTEED_MINIMUM_DISTANCE_NOT_MET An attempt to create a pending Order was made with the distance between the guaranteed Stop Loss Order on fill’s price and the pending Order’s price is less than the Account’s configured minimum guaranteed stop loss distance.
STOP_LOSS_ON_FILL_GUARANTEED_LEVEL_RESTRICTION_EXCEEDED An attempt to create a pending Order was made with a guaranteed Stop Loss Order on fill configured, and the Order’s units exceed the Account’s configured guaranteed StopLoss Order level restriction volume.
STOP_LOSS_ON_FILL_DISTANCE_INVALID The Stop Loss on fill distance is invalid
STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED The Stop Loss on fill price distance exceeds the maximum allowed amount
STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED The Stop Loss on fill distance contains more precision than is allowed by the instrument
STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED The Stop Loss on fill contains both the price and distance fields.
STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING The Stop Loss on fill contains neither the price nor distance fields.
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
GUARANTEED_STOP_LOSS_ORDER_ALREADY_EXISTS A Guaranteed Stop Loss Order for the specified Trade already exists
GUARANTEED_STOP_LOSS_ORDER_REQUIRED An attempt was made to to create a non-guaranteed stop loss order in an account that requires all stop loss orders to be guaranteed.
GUARANTEED_STOP_LOSS_ORDER_PRICE_WITHIN_SPREAD An attempt to create a guaranteed stop loss order with a price that is within the current tradeable spread.
GUARANTEED_STOP_LOSS_ORDER_NOT_ALLOWED An attempt was made to create a Guaranteed Stop Loss Order, however the Account’s configuration does not allow Guaranteed Stop Loss Orders.
GUARANTEED_STOP_LOSS_ORDER_HALTED_CREATE_VIOLATION An attempt was made to create a Guaranteed Stop Loss Order when the market was halted.
GUARANTEED_STOP_LOSS_ORDER_CREATE_VIOLATION An attempt was made to create a Guaranteed Stop Loss Order when the market was open.
GUARANTEED_STOP_LOSS_ORDER_HALTED_TIGHTEN_VIOLATION An attempt was made to re-create a Guaranteed Stop Loss Order with a tighter fill price when the market was halted.
GUARANTEED_STOP_LOSS_ORDER_TIGHTEN_VIOLATION An attempt was made to re-create a Guaranteed Stop Loss Order with a tighter fill price when the market was open.
GUARANTEED_STOP_LOSS_ORDER_HEDGING_NOT_ALLOWED An attempt was made to create a Guaranteed Stop Loss Order on a hedged Trade (ie there is an existing open Trade in the opposing direction), however the Account’s configuration does not allow Guaranteed Stop Loss Orders for hedged Trades/Positions.
GUARANTEED_STOP_LOSS_ORDER_MINIMUM_DISTANCE_NOT_MET An attempt was made to create a Guaranteed Stop Loss Order, however the distance between the current price and the trigger price does not meet the Account’s configured minimum Guaranteed Stop Loss distance.
GUARANTEED_STOP_LOSS_ORDER_NOT_CANCELABLE An attempt was made to cancel a Guaranteed Stop Loss Order when the market is open, however the Account’s configuration requires every Trade have an associated Guaranteed Stop Loss Order.
GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_CANCELABLE An attempt was made to cancel a Guaranteed Stop Loss Order when the market is halted, however the Account’s configuration requires every Trade have an associated Guaranteed Stop Loss Order.
GUARANTEED_STOP_LOSS_ORDER_NOT_REPLACEABLE An attempt was made to cancel and replace a Guaranteed Stop Loss Order when the market is open, however the Account’s configuration prevents the modification of Guaranteed Stop Loss Orders.
GUARANTEED_STOP_LOSS_ORDER_HALTED_NOT_REPLACEABLE An attempt was made to cancel and replace a Guaranteed Stop Loss Order when the market is halted, however the Account’s configuration prevents the modification of Guaranteed Stop Loss Orders.
GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_VOLUME_EXCEEDED An attempt was made to create a Guaranteed Stop Loss Order, however doing so would exceed the Account’s configured guaranteed StopLoss Order level restriction volume.
GUARANTEED_STOP_LOSS_ORDER_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED An attempt was made to create a Guaranteed Stop Loss Order, however doing so would exceed the Account’s configured guaranteed StopLoss Order level restriction price range.
GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_SPECIFIED The Guaranteed Stop Loss Order request contains both the price and distance fields.
GUARANTEED_STOP_LOSS_ORDER_PRICE_AND_DISTANCE_BOTH_MISSING The Guaranteed Stop Loss Order request contains neither the price nor distance fields.
GUARANTEED_STOP_LOSS_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD The Guaranteed Stop Loss Order would cause the associated Trade to be in violation of the FIFO violation safeguard constraints
GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION The Guaranteed Stop Loss Order would be in violation of the risk management Order mutual exclusivity configuration specifying that only one risk management order can be attached to a Trade.
GUARANTEED_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION The Guaranteed Stop Loss Order would be in violation of the risk management Order mutual exclusivity configuration specifying that if a GSLO is already attached to a Trade, no other risk management Order can be attached to the same Trade.
GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED_FOR_PENDING_ORDER An attempt to create a pending Order was made with no Guaranteed Stop Loss Order on fill specified and the Account’s configuration requires that every Trade have an associated Guaranteed Stop Loss Order.
GUARANTEED_STOP_LOSS_ON_FILL_NOT_ALLOWED An attempt to create a pending Order was made with a Guaranteed Stop Loss Order on fill that was explicitly configured to be guaranteed, however the Account’s configuration does not allow guaranteed Stop Loss Orders.
GUARANTEED_STOP_LOSS_ON_FILL_REQUIRED An attempt to create a pending Order was made with a Guaranteed Stop Loss Order on fill that was explicitly configured to be not guaranteed, however the Account’s configuration requires Guaranteed Stop Loss Orders.
GUARANTEED_STOP_LOSS_ON_FILL_PRICE_MISSING The Guaranteed Stop Loss on fill specified does not provide a price
GUARANTEED_STOP_LOSS_ON_FILL_PRICE_INVALID The Guaranteed Stop Loss on fill specifies an invalid price
GUARANTEED_STOP_LOSS_ON_FILL_PRICE_PRECISION_EXCEEDED The Guaranteed Stop Loss on fill specifies a price with more precision than is allowed by the Order’s instrument
GUARANTEED_STOP_LOSS_ON_FILL_MINIMUM_DISTANCE_NOT_MET An attempt to create a pending Order was made with the distance between the Guaranteed Stop Loss Order on fill’s price and the pending Order’s price is less than the Account’s configured minimum guaranteed stop loss distance.
GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_VOLUME_EXCEEDED Filling the Order would result in the creation of a Guaranteed Stop Loss Order with trigger number of units that violates the account’s Guaranteed Stop Loss Order level restriction volume.
GUARANTEED_STOP_LOSS_ON_FILL_LEVEL_RESTRICTION_PRICE_RANGE_EXCEEDED Filling the Order would result in the creation of a Guaranteed Stop Loss Order with trigger price that violates the account’s Guaranteed Stop Loss Order level restriction price range.
GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_INVALID The Guaranteed Stop Loss on fill distance is invalid
GUARANTEED_STOP_LOSS_ON_FILL_PRICE_DISTANCE_MAXIMUM_EXCEEDED The Guaranteed Stop Loss on fill price distance exceeds the maximum allowed amount.
GUARANTEED_STOP_LOSS_ON_FILL_DISTANCE_PRECISION_EXCEEDED The Guaranteed Stop Loss on fill distance contains more precision than is allowed by the instrument
GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_SPECIFIED The Guaranteed Stop Loss on fill contains both the price and distance fields.
GUARANTEED_STOP_LOSS_ON_FILL_PRICE_AND_DISTANCE_BOTH_MISSING The Guaranteed Stop Loss on fill contains neither the price nor distance fields.
GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_MISSING The Guaranteed Stop Loss on fill specified does not provide a TimeInForce
GUARANTEED_STOP_LOSS_ON_FILL_TIME_IN_FORCE_INVALID The Guaranteed Stop Loss on fill specifies an invalid TimeInForce
GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_MISSING The Guaranteed Stop Loss on fill specifies a GTD TimeInForce but does not provide a GTD timestamp
GUARANTEED_STOP_LOSS_ON_FILL_GTD_TIMESTAMP_IN_PAST The Guaranteed Stop Loss on fill specifies a GTD timestamp that is in the past.
GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_ID_INVALID The Guaranteed Stop Loss on fill client Order ID specified is invalid
GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_TAG_INVALID The Guaranteed Stop Loss on fill client Order tag specified is invalid
GUARANTEED_STOP_LOSS_ON_FILL_CLIENT_ORDER_COMMENT_INVALID The Guaranteed Stop Loss on fill client Order comment specified is invalid.
GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_MISSING The Guaranteed Stop Loss on fill specified does not provide a TriggerCondition.
GUARANTEED_STOP_LOSS_ON_FILL_TRIGGER_CONDITION_INVALID The Guaranteed 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_ORDER_WOULD_VIOLATE_FIFO_VIOLATION_SAFEGUARD The Trailing Stop Loss Order would cause the associated Trade to be in violation of the FIFO violation safeguard constraints
TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_MUTUALLY_EXCLUSIVE_VIOLATION The Trailing Stop Loss Order would be in violation of the risk management Order mutual exclusivity configuration specifying that only one risk management order can be attached to a Trade.
TRAILING_STOP_LOSS_ORDER_RMO_MUTUAL_EXCLUSIVITY_GSLO_EXCLUDES_OTHERS_VIOLATION The Trailing Stop Loss Order would be in violation of the risk management Order mutual exclusivity configuration specifying that if a GSLO is already attached to a Trade, no other risk management Order can be attached to the same Trade.
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
OCA_ORDER_IDS_STOP_LOSS_NOT_ALLOWED The list of Order Identifiers provided for a One Cancels All Order contains an Order Identifier that refers to a Stop Loss Order. OCA groups cannot contain Stop Loss Orders.
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.
ORDER_CANCEL_WOULD_TRIGGER_CLOSEOUT Canceling the order would cause an immediate margin closeout.

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
GUARANTEED_STOP_LOSS_ORDER Guaranteed Stop Loss Order Transaction
GUARANTEED_STOP_LOSS_ORDER_REJECT Guaranteed 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)
}