Error codes
OANDA API error codes
242 decoded error codes for OANDA. Each page gives the exact error text and what it means. 148 of them carry a fix or a next step, and each of those rows is marked Fix recorded. Where the source gives no remedy, the page says so.
Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.
Order rejection reasons
171 codes
In the rejection the API reports, not in the HTTP status.
ACCOUNT_The account is locked for configuration changes.CONFIGURATION_ LOCKED ACCOUNT_The account is locked for deposits.DEPOSIT_ LOCKED ACCOUNT_The account is not active.NOT_ ACTIVE ACCOUNT_The account is locked for order cancellation.ORDER_ CANCEL_ LOCKED ACCOUNT_The account is locked for withdrawals.WITHDRAWAL_ LOCKED ADMIN_Fix recorded No configuration parameters were provided.CONFIGURE_ DATA_ MISSING ALIAS_Fix recorded The account alias string provided is not valid.INVALID AMOUNT_Fix recorded Funding is not possible because the transfer amount requested is not valid.INVALID AMOUNT_Fix recorded The funding amount was not specified.MISSING CLIENT_Fix recorded No configuration parameters were provided.CONFIGURE_ DATA_ MISSING CLIENT_Fix recorded Neither order client extensions nor trade on fill client extensions were provided for the modification.EXTENSIONS_ DATA_ MISSING CLIENT_Fix recorded The client order comment specified is not valid.ORDER_ COMMENT_ INVALID CLIENT_Fix recorded The client order ID is already assigned to another pending order.ORDER_ ID_ ALREADY_ EXISTS CLIENT_Fix recorded The client order ID specified is not valid.ORDER_ ID_ INVALID CLIENT_Fix recorded The client order tag specified is not valid.ORDER_ TAG_ INVALID CLIENT_Fix recorded The client trade comment is not valid.TRADE_ COMMENT_ INVALID CLIENT_Fix recorded The client trade ID specified is not valid.TRADE_ ID_ INVALID CLIENT_Fix recorded The client trade tag specified is not valid.TRADE_ TAG_ INVALID CLOSE_Fix recorded The request to close a trade partially did not give the number of units to close.TRADE_ PARTIAL_ UNITS_ MISSING CLOSE_Fix recorded The request to close a trade does not say whether the close is full or partial.TRADE_ TYPE_ MISSING CLOSE_Fix recorded The request to close part of a trade names more units than the trade currently has.TRADE_ UNITS_ EXCEED_ TRADE_ SIZE CLOSEOUT_Fix recorded The position asked to be closed out does not exist.POSITION_ DOESNT_ EXIST CLOSEOUT_Fix recorded The request to close out a position was specified incompletely.POSITION_ INCOMPLETE_ SPECIFICATION CLOSEOUT_Fix recorded The request to close out part of a position did not give the number of units to close.POSITION_ PARTIAL_ UNITS_ MISSING CLOSEOUT_The request to close out a position could not be fully satisfied.POSITION_ REJECT CLOSEOUT_Fix recorded A partial position closeout names more units than the position currently has.POSITION_ UNITS_ EXCEED_ POSITION_ SIZE FUNDING_Fix recorded The funding reason was not specified.REASON_ MISSING GUARANTEED_Fix recorded The client order comment on the guaranteed stop loss on fill is not valid.STOP_ LOSS_ ON_ FILL_ CLIENT_ ORDER_ COMMENT_ INVALID GUARANTEED_Fix recorded The client order ID on the guaranteed stop loss on fill is not valid.STOP_ LOSS_ ON_ FILL_ CLIENT_ ORDER_ ID_ INVALID GUARANTEED_Fix recorded The client order tag on the guaranteed stop loss on fill is not valid.STOP_ LOSS_ ON_ FILL_ CLIENT_ ORDER_ TAG_ INVALID GUARANTEED_Fix recorded The guaranteed stop loss on fill distance is not valid.STOP_ LOSS_ ON_ FILL_ DISTANCE_ INVALID GUARANTEED_Fix recorded The guaranteed stop loss on fill distance carries more precision than the instrument allows.STOP_ LOSS_ ON_ FILL_ DISTANCE_ PRECISION_ EXCEEDED GUARANTEED_Fix recorded The guaranteed stop loss on fill has a GTD TimeInForce but no GTD timestamp.STOP_ LOSS_ ON_ FILL_ GTD_ TIMESTAMP_ MISSING GUARANTEED_Fix recorded The guaranteed stop loss on fill contains neither the price field nor the distance field.STOP_ LOSS_ ON_ FILL_ PRICE_ AND_ DISTANCE_ BOTH_ MISSING GUARANTEED_Fix recorded The guaranteed stop loss on fill contains both the price field and the distance field.STOP_ LOSS_ ON_ FILL_ PRICE_ AND_ DISTANCE_ BOTH_ SPECIFIED GUARANTEED_Fix recorded The guaranteed stop loss on fill gives a price that is not valid.STOP_ LOSS_ ON_ FILL_ PRICE_ INVALID GUARANTEED_Fix recorded The guaranteed stop loss on fill does not give a price.STOP_ LOSS_ ON_ FILL_ PRICE_ MISSING GUARANTEED_Fix recorded The guaranteed stop loss on fill gives a price with more precision than the order's instrument allows.STOP_ LOSS_ ON_ FILL_ PRICE_ PRECISION_ EXCEEDED GUARANTEED_Fix recorded A pending order was sent with no guaranteed stop loss on fill, and the account's configuration requires every trade to have a guaranteed stop loss order.STOP_ LOSS_ ON_ FILL_ REQUIRED_ FOR_ PENDING_ ORDER GUARANTEED_Fix recorded The guaranteed stop loss on fill does not give a TimeInForce.STOP_ LOSS_ ON_ FILL_ TIME_ IN_ FORCE_ MISSING GUARANTEED_Fix recorded The guaranteed stop loss on fill does not give a TriggerCondition.STOP_ LOSS_ ON_ FILL_ TRIGGER_ CONDITION_ MISSING GUARANTEED_A guaranteed stop loss order already exists for the trade specified.STOP_ LOSS_ ORDER_ ALREADY_ EXISTS GUARANTEED_A guaranteed stop loss order was sent while the market was open, which OANDA's page lists as a violation.STOP_ LOSS_ ORDER_ CREATE_ VIOLATION GUARANTEED_A guaranteed stop loss order was sent while the market was halted.STOP_ LOSS_ ORDER_ HALTED_ CREATE_ VIOLATION GUARANTEED_A guaranteed stop loss order could not be cancelled while the market is halted, because the account's configuration requires every trade to have one.STOP_ LOSS_ ORDER_ HALTED_ NOT_ CANCELABLE GUARANTEED_A guaranteed stop loss order could not be cancelled and replaced while the market is halted, because the account's configuration prevents guaranteed stop loss orders from being modified.STOP_ LOSS_ ORDER_ HALTED_ NOT_ REPLACEABLE GUARANTEED_A guaranteed stop loss order was sent again with a tighter fill price while the market was halted.STOP_ LOSS_ ORDER_ HALTED_ TIGHTEN_ VIOLATION GUARANTEED_A guaranteed stop loss order was sent for a hedged trade, meaning an open trade exists in the opposite direction, and the account's configuration does not allow that.STOP_ LOSS_ ORDER_ HEDGING_ NOT_ ALLOWED GUARANTEED_A guaranteed stop loss order was sent that would take the account past its configured level restriction price range for guaranteed stop loss orders.STOP_ LOSS_ ORDER_ LEVEL_ RESTRICTION_ PRICE_ RANGE_ EXCEEDED GUARANTEED_A guaranteed stop loss order was sent that would take the account past its configured level restriction volume for guaranteed stop loss orders.STOP_ LOSS_ ORDER_ LEVEL_ RESTRICTION_ VOLUME_ EXCEEDED GUARANTEED_A guaranteed stop loss order was sent whose trigger price is closer to the current price than the account's configured minimum guaranteed stop loss distance.STOP_ LOSS_ ORDER_ MINIMUM_ DISTANCE_ NOT_ MET GUARANTEED_A guaranteed stop loss order was sent, but the account's configuration does not allow guaranteed stop loss orders.STOP_ LOSS_ ORDER_ NOT_ ALLOWED GUARANTEED_A guaranteed stop loss order could not be cancelled while the market is open, because the account's configuration requires every trade to have one.STOP_ LOSS_ ORDER_ NOT_ CANCELABLE GUARANTEED_A guaranteed stop loss order could not be cancelled and replaced while the market is open, because the account's configuration prevents guaranteed stop loss orders from being modified.STOP_ LOSS_ ORDER_ NOT_ REPLACEABLE GUARANTEED_Fix recorded The guaranteed stop loss order request contains neither the price field nor the distance field.STOP_ LOSS_ ORDER_ PRICE_ AND_ DISTANCE_ BOTH_ MISSING GUARANTEED_Fix recorded The guaranteed stop loss order request contains both the price field and the distance field.STOP_ LOSS_ ORDER_ PRICE_ AND_ DISTANCE_ BOTH_ SPECIFIED GUARANTEED_A guaranteed stop loss order was sent with a price inside the current tradeable spread.STOP_ LOSS_ ORDER_ PRICE_ WITHIN_ SPREAD GUARANTEED_A stop loss order that is not guaranteed was sent on an account that requires every stop loss order to be guaranteed.STOP_ LOSS_ ORDER_ REQUIRED GUARANTEED_The guaranteed stop loss order would break the account's rule that a trade with a guaranteed stop loss order can carry no other risk management order.STOP_ LOSS_ ORDER_ RMO_ MUTUAL_ EXCLUSIVITY_ GSLO_ EXCLUDES_ OTHERS_ VIOLATION GUARANTEED_The guaranteed stop loss order would break the account's rule that only one risk management order can be attached to a trade.STOP_ LOSS_ ORDER_ RMO_ MUTUAL_ EXCLUSIVITY_ MUTUALLY_ EXCLUSIVE_ VIOLATION GUARANTEED_A guaranteed stop loss order was sent again with a tighter fill price while the market was open, which OANDA's page lists as a violation.STOP_ LOSS_ ORDER_ TIGHTEN_ VIOLATION GUARANTEED_The guaranteed stop loss order would put its trade in breach of the FIFO violation safeguard constraints.STOP_ LOSS_ ORDER_ WOULD_ VIOLATE_ FIFO_ VIOLATION_ SAFEGUARD INSTRUMENT_Fix recorded The order's instrument was not specified.MISSING INSTRUMENT_Fix recorded The instrument specified cannot be traded by this account.NOT_ TRADEABLE INSTRUMENT_OANDA's system could not determine the current price for the order's instrument.PRICE_ UNKNOWN INSTRUMENT_Fix recorded The instrument specified is unknown.UNKNOWN INSUFFICIENT_The account does not have enough balance to complete the funding request.FUNDS INVALID_An order that was partially filled straight away could not be reissued as a correct pending order.REISSUE_ IMMEDIATE_ PARTIAL_ FILL MARGIN_Fix recorded The margin rate provided is not valid.RATE_ INVALID MARGIN_The margin rate provided would cause an immediate margin closeout, so the change was refused.RATE_ WOULD_ TRIGGER_ CLOSEOUT MARGIN_The margin rate provided would put the account into a margin call state, so the change was refused.RATE_ WOULD_ TRIGGER_ MARGIN_ CALL MARKUP_Fix recorded The markup group ID provided is not valid.GROUP_ ID_ INVALID OCA_Fix recorded The list of order identifiers for a One Cancels All order includes a stop loss order.ORDER_ IDS_ STOP_ LOSS_ NOT_ ALLOWED ORDER_Cancelling the order would cause an immediate margin closeout.CANCEL_ WOULD_ TRIGGER_ CLOSEOUT ORDER_Fix recorded The order specified does not exist.DOESNT_ EXIST ORDER_Fix recorded The OrderFillPositionAction specified is not valid.FILL_ POSITION_ ACTION_ INVALID ORDER_Fix recorded The OrderFillPositionAction field was not specified.FILL_ POSITION_ ACTION_ MISSING ORDER_Fix recorded Neither the order ID nor the client order ID was specified.ID_ UNSPECIFIED ORDER_Fix recorded The order ID and the client order ID given do not identify the same order.IDENTIFIER_ INCONSISTENCY ORDER_Fix recorded The order's partial fill option is not valid.PARTIAL_ FILL_ OPTION_ INVALID ORDER_Fix recorded The order's partial fill option was not specified.PARTIAL_ FILL_ OPTION_ MISSING ORDERS_Fix recorded More than one of the orders to be created on fill carries the same client order ID.ON_ FILL_ DUPLICATE_ CLIENT_ ORDER_ IDS ORDERS_The orders on fill would break the account's rule that a trade with a guaranteed stop loss order can carry no other risk management order.ON_ FILL_ RMO_ MUTUAL_ EXCLUSIVITY_ GSLO_ EXCLUDES_ OTHERS_ VIOLATION POSITION_Fix recorded The PositionAggregationMode provided is not supported or not valid.AGGREGATION_ MODE_ INVALID PRICE_Fix recorded The price bound specified is not valid.BOUND_ INVALID PRICE_Fix recorded The price bound carries more precision than the order's instrument allows.BOUND_ PRECISION_ EXCEEDED PRICE_Fix recorded The price distance specified is not valid.DISTANCE_ INVALID PRICE_Fix recorded The price distance is more than the maximum amount allowed.DISTANCE_ MAXIMUM_ EXCEEDED PRICE_Fix recorded The price distance is less than the minimum amount allowed.DISTANCE_ MINIMUM_ NOT_ MET PRICE_Fix recorded The price distance was not specified.DISTANCE_ MISSING PRICE_Fix recorded The price distance carries more precision than the instrument allows.DISTANCE_ PRECISION_ EXCEEDED PRICE_Fix recorded The price specified is not valid.INVALID PRICE_Fix recorded The price was not specified.MISSING PRICE_Fix recorded The price carries more precision than the instrument allows.PRECISION_ EXCEEDED REPLACING_Fix recorded The order to be replaced is of a different type from the replacing order.ORDER_ INVALID REPLACING_Fix recorded The replacing order refers to a different trade from the order being replaced.TRADE_ ID_ INVALID STOP_Fix recorded The client order comment on the stop loss on fill is not valid.LOSS_ ON_ FILL_ CLIENT_ ORDER_ COMMENT_ INVALID STOP_Fix recorded The client order ID on the stop loss on fill is not valid.LOSS_ ON_ FILL_ CLIENT_ ORDER_ ID_ INVALID STOP_Fix recorded The client order tag on the stop loss on fill is not valid.LOSS_ ON_ FILL_ CLIENT_ ORDER_ TAG_ INVALID STOP_Fix recorded The stop loss on fill distance is not valid.LOSS_ ON_ FILL_ DISTANCE_ INVALID STOP_Fix recorded The stop loss on fill distance carries more precision than the instrument allows.LOSS_ ON_ FILL_ DISTANCE_ PRECISION_ EXCEEDED STOP_Fix recorded The stop loss on fill has a GTD TimeInForce but no GTD timestamp.LOSS_ ON_ FILL_ GTD_ TIMESTAMP_ MISSING STOP_Fix recorded The stop loss on fill contains neither the price field nor the distance field.LOSS_ ON_ FILL_ PRICE_ AND_ DISTANCE_ BOTH_ MISSING STOP_Fix recorded The stop loss on fill contains both the price field and the distance field.LOSS_ ON_ FILL_ PRICE_ AND_ DISTANCE_ BOTH_ SPECIFIED STOP_Fix recorded The stop loss on fill gives a price that is not valid.LOSS_ ON_ FILL_ PRICE_ INVALID STOP_Fix recorded The stop loss on fill does not give a price.LOSS_ ON_ FILL_ PRICE_ MISSING STOP_Fix recorded A pending order was sent with no stop loss on fill, and the account's configuration requires every trade to have a stop loss order.LOSS_ ON_ FILL_ REQUIRED_ FOR_ PENDING_ ORDER STOP_Fix recorded The stop loss on fill does not give a TimeInForce.LOSS_ ON_ FILL_ TIME_ IN_ FORCE_ MISSING STOP_Fix recorded The stop loss on fill does not give a TriggerCondition.LOSS_ ON_ FILL_ TRIGGER_ CONDITION_ MISSING STOP_A stop loss order already exists for the trade specified.LOSS_ ORDER_ ALREADY_ EXISTS STOP_A guaranteed stop loss order was sent while the market was halted.LOSS_ ORDER_ GUARANTEED_ HALTED_ CREATE_ VIOLATION STOP_A guaranteed stop loss order was sent again with a tighter fill price while the market was halted.LOSS_ ORDER_ GUARANTEED_ HALTED_ TIGHTEN_ VIOLATION STOP_A guaranteed stop loss order was sent for a hedged trade, meaning an open trade exists in the opposite direction, and the account's configuration does not allow that.LOSS_ ORDER_ GUARANTEED_ HEDGING_ NOT_ ALLOWED STOP_A guaranteed stop loss order was sent that would take the account past its configured level restriction volume for guaranteed stop loss orders.LOSS_ ORDER_ GUARANTEED_ LEVEL_ RESTRICTION_ EXCEEDED STOP_A guaranteed stop loss order was sent whose trigger price is closer to the current price than the account's configured minimum guaranteed stop loss distance.LOSS_ ORDER_ GUARANTEED_ MINIMUM_ DISTANCE_ NOT_ MET STOP_A guaranteed stop loss order was sent, but the account's configuration does not allow guaranteed stop loss orders.LOSS_ ORDER_ GUARANTEED_ NOT_ ALLOWED STOP_A guaranteed stop loss order was sent with a price inside the current tradeable spread.LOSS_ ORDER_ GUARANTEED_ PRICE_ WITHIN_ SPREAD STOP_A stop loss order that is not guaranteed was sent on an account that requires every stop loss order to be guaranteed.LOSS_ ORDER_ GUARANTEED_ REQUIRED STOP_A stop loss order could not be cancelled because the account's configuration requires every trade to have one.LOSS_ ORDER_ NOT_ CANCELABLE STOP_A stop loss order could not be cancelled and replaced because the account's configuration prevents stop loss orders from being modified.LOSS_ ORDER_ NOT_ REPLACEABLE STOP_Fix recorded The stop loss order request contains neither the price field nor the distance field.LOSS_ ORDER_ PRICE_ AND_ DISTANCE_ BOTH_ MISSING STOP_Fix recorded The stop loss order request contains both the price field and the distance field.LOSS_ ORDER_ PRICE_ AND_ DISTANCE_ BOTH_ SPECIFIED STOP_The stop loss order would break the account's rule that a trade with a guaranteed stop loss order can carry no other risk management order.LOSS_ ORDER_ RMO_ MUTUAL_ EXCLUSIVITY_ GSLO_ EXCLUDES_ OTHERS_ VIOLATION STOP_The stop loss order would break the account's rule that only one risk management order can be attached to a trade.LOSS_ ORDER_ RMO_ MUTUAL_ EXCLUSIVITY_ MUTUALLY_ EXCLUSIVE_ VIOLATION STOP_The stop loss order would put its trade in breach of the FIFO violation safeguard constraints.LOSS_ ORDER_ WOULD_ VIOLATE_ FIFO_ VIOLATION_ SAFEGUARD TAKE_Fix recorded The client order comment on the take profit on fill is not valid.PROFIT_ ON_ FILL_ CLIENT_ ORDER_ COMMENT_ INVALID TAKE_Fix recorded The client order ID on the take profit on fill is not valid.PROFIT_ ON_ FILL_ CLIENT_ ORDER_ ID_ INVALID TAKE_Fix recorded The client order tag on the take profit on fill is not valid.PROFIT_ ON_ FILL_ CLIENT_ ORDER_ TAG_ INVALID TAKE_Fix recorded The take profit on fill has a GTD TimeInForce but no GTD timestamp.PROFIT_ ON_ FILL_ GTD_ TIMESTAMP_ MISSING TAKE_Fix recorded The take profit on fill contains a price that is not valid.PROFIT_ ON_ FILL_ PRICE_ INVALID TAKE_Fix recorded The take profit on fill does not give a price.PROFIT_ ON_ FILL_ PRICE_ MISSING TAKE_Fix recorded The take profit on fill gives a price with more precision than the order's instrument allows.PROFIT_ ON_ FILL_ PRICE_ PRECISION_ EXCEEDED TAKE_Fix recorded The take profit on fill gives a TimeInForce that is not valid.PROFIT_ ON_ FILL_ TIME_ IN_ FORCE_ INVALID TAKE_Fix recorded The take profit on fill does not give a TimeInForce.PROFIT_ ON_ FILL_ TIME_ IN_ FORCE_ MISSING TAKE_Fix recorded The take profit on fill gives a TriggerCondition that is not valid.PROFIT_ ON_ FILL_ TRIGGER_ CONDITION_ INVALID TAKE_Fix recorded The take profit on fill does not give a TriggerCondition.PROFIT_ ON_ FILL_ TRIGGER_ CONDITION_ MISSING TAKE_A take profit order already exists for the trade specified.PROFIT_ ORDER_ ALREADY_ EXISTS TAKE_The take profit order would put its trade in breach of the FIFO violation safeguard constraints.PROFIT_ ORDER_ WOULD_ VIOLATE_ FIFO_ VIOLATION_ SAFEGUARD TIME_Fix recorded The TimeInForce is GTD but the GTD timestamp is in the past.IN_ FORCE_ GTD_ TIMESTAMP_ IN_ PAST TIME_Fix recorded The TimeInForce is GTD but no GTD timestamp was given.IN_ FORCE_ GTD_ TIMESTAMP_ MISSING TIME_Fix recorded The TimeInForce specified is not valid.IN_ FORCE_ INVALID TIME_Fix recorded The TimeInForce field was not specified.IN_ FORCE_ MISSING TRADE_Fix recorded The trade specified does not exist.DOESNT_ EXIST TRADE_Fix recorded Neither the trade ID nor the client trade ID was specified.ID_ UNSPECIFIED TRADE_Fix recorded The trade ID and the client trade ID given do not identify the same trade.IDENTIFIER_ INCONSISTENCY TRADE_Fix recorded The order cannot create a new trade, so it does not support trade on fill client extensions.ON_ FILL_ CLIENT_ EXTENSIONS_ NOT_ SUPPORTED TRAILING_Fix recorded The client order comment on the trailing stop loss on fill is not valid.STOP_ LOSS_ ON_ FILL_ CLIENT_ ORDER_ COMMENT_ INVALID TRAILING_Fix recorded The client order ID on the trailing stop loss on fill is not valid.STOP_ LOSS_ ON_ FILL_ CLIENT_ ORDER_ ID_ INVALID TRAILING_Fix recorded The client order tag on the trailing stop loss on fill is not valid.STOP_ LOSS_ ON_ FILL_ CLIENT_ ORDER_ TAG_ INVALID TRAILING_Fix recorded The trailing stop loss on fill has a GTD TimeInForce but no GTD timestamp.STOP_ LOSS_ ON_ FILL_ GTD_ TIMESTAMP_ MISSING TRAILING_Fix recorded The trailing stop loss on fill distance is not valid.STOP_ LOSS_ ON_ FILL_ PRICE_ DISTANCE_ INVALID TRAILING_Fix recorded The trailing stop loss on fill price distance is more than the maximum allowed.STOP_ LOSS_ ON_ FILL_ PRICE_ DISTANCE_ MAXIMUM_ EXCEEDED TRAILING_Fix recorded The trailing stop loss on fill price distance is less than the minimum allowed.STOP_ LOSS_ ON_ FILL_ PRICE_ DISTANCE_ MINIMUM_ NOT_ MET TRAILING_Fix recorded The trailing stop loss on fill does not give a distance.STOP_ LOSS_ ON_ FILL_ PRICE_ DISTANCE_ MISSING TRAILING_Fix recorded The trailing stop loss on fill distance carries more precision than the instrument allows.STOP_ LOSS_ ON_ FILL_ PRICE_ DISTANCE_ PRECISION_ EXCEEDED TRAILING_Fix recorded The trailing stop loss on fill gives a TimeInForce that is not valid.STOP_ LOSS_ ON_ FILL_ TIME_ IN_ FORCE_ INVALID TRAILING_Fix recorded The trailing stop loss on fill does not give a TimeInForce.STOP_ LOSS_ ON_ FILL_ TIME_ IN_ FORCE_ MISSING TRAILING_Fix recorded The trailing stop loss on fill gives a TriggerCondition that is not valid.STOP_ LOSS_ ON_ FILL_ TRIGGER_ CONDITION_ INVALID TRAILING_Fix recorded The trailing stop loss on fill does not give a TriggerCondition.STOP_ LOSS_ ON_ FILL_ TRIGGER_ CONDITION_ MISSING TRAILING_A trailing stop loss order already exists for the trade specified.STOP_ LOSS_ ORDER_ ALREADY_ EXISTS TRAILING_The trailing stop loss order would break the account's rule that a trade with a guaranteed stop loss order can carry no other risk management order.STOP_ LOSS_ ORDER_ RMO_ MUTUAL_ EXCLUSIVITY_ GSLO_ EXCLUDES_ OTHERS_ VIOLATION TRAILING_The trailing stop loss order would break the account's rule that only one risk management order can be attached to a trade.STOP_ LOSS_ ORDER_ RMO_ MUTUAL_ EXCLUSIVITY_ MUTUALLY_ EXCLUSIVE_ VIOLATION TRAILING_The trailing stop loss order would put its trade in breach of the FIFO violation safeguard constraints.STOP_ LOSS_ ORDER_ WOULD_ VIOLATE_ FIFO_ VIOLATION_ SAFEGUARD TRAILING_A trailing stop loss order, or an order with a trailing stop loss on fill, was sent where OANDA's page says it may not yet be supported.STOP_ LOSS_ ORDERS_ NOT_ SUPPORTED TRIGGER_Fix recorded The TriggerCondition specified is not valid.CONDITION_ INVALID TRIGGER_Fix recorded The TriggerCondition field was not specified.CONDITION_ MISSING UNITS_Fix recorded The order units specified are not valid.INVALID UNITS_Fix recorded The units in the request are more than the maximum number of units allowed.LIMIT_ EXCEEDED UNITS_Fix recorded The units are fewer than the minimum number of units required.MINIMUM_ NOT_ MET UNITS_Fix recorded The order's units were not specified.MISSING UNITS_Fix recorded The units carry more precision than the order's instrument allows.PRECISION_ EXCEEDED
Order cancel reasons
33 codes
In the cancellation the API reports, not in the HTTP status.
ACCOUNT_The order was to be filled, but the account is configured not to allow new positions to be created.NEW_ POSITIONS_ LOCKED ACCOUNT_The order could not be filled because the account is locked for filling orders.ORDER_ FILL_ LOCKED ACCOUNT_Filling the order would have taken the account past the maximum position value it is allowed, so the order was cancelled.POSITION_ VALUE_ LIMIT_ EXCEEDED BOUNDS_Filling the order would have broken the order's price bound.VIOLATION FIFO_Filling the order would have resulted in a FIFO violation.VIOLATION FIFO_Filling the order would have reduced an existing trade so that the reduced trade breaks the FIFO violation safeguard constraints.VIOLATION_ SAFEGUARD_ PARTIAL_ CLOSE_ VIOLATION FIFO_Filling the order would have created a trade that breaks the FIFO violation safeguard constraints.VIOLATION_ SAFEGUARD_ VIOLATION GUARANTEED_Filling the order would create a guaranteed stop loss order on a short trade, which would be long, while the ask side is halted.STOP_ LOSS_ ON_ FILL_ ASK_ HALTED GUARANTEED_Filling the order would create a guaranteed stop loss order on a long trade, which would be short, while the bid side is halted.STOP_ LOSS_ ON_ FILL_ BID_ HALTED GUARANTEED_Fix recorded Filling the order would have created a guaranteed stop loss order with a client order ID that is already in use.STOP_ LOSS_ ON_ FILL_ CLIENT_ ORDER_ ID_ ALREADY_ EXISTS GUARANTEED_Filling the order would create a guaranteed stop loss order for a hedged trade, and the account's configuration does not allow that.STOP_ LOSS_ ON_ FILL_ HEDGING_ NOT_ ALLOWED GUARANTEED_Filling the order would create a guaranteed stop loss order that would be filled immediately, closing the new trade at a loss.STOP_ LOSS_ ON_ FILL_ LOSS HEDGING_Filling the order would create a trade while an opposing, hedged trade already carries a guaranteed stop loss order.GSLO_ VIOLATION INSTRUMENT_Filling the order would use the ask, but asks are halted on the instrument, so no long orders can be filled.ASK_ HALTED INSTRUMENT_Filling the order would need a new long trade, but the instrument is configured so that orders filled at ask prices can only reduce existing positions.ASK_ REDUCE_ ONLY INSTRUMENT_Filling the order would use the bid, but bids are halted on the instrument, so no short orders can be filled.BID_ HALTED INSTRUMENT_Filling the order would need a new short trade, but the instrument is configured so that orders filled at bid prices can only reduce existing positions.BID_ REDUCE_ ONLY INSUFFICIENT_The order could not be filled for want of liquidity.LIQUIDITY LOSING_Filling the order would create a take profit order that would close the new trade at a loss when filled.TAKE_ PROFIT MARKET_The order could not be filled because its instrument was halted.HALTED OPEN_Filling the order would take the account past the maximum number of open trades it is allowed.TRADES_ ALLOWED_ EXCEEDED POSITION_Closing out a position was not fully possible.CLOSEOUT_ FAILED POSITION_Filling the order would have taken the account past its maximum position size for the order's instrument.SIZE_ EXCEEDED STOP_Fix recorded Filling the order would have created a stop loss order with a client order ID that is already in use.LOSS_ ON_ FILL_ CLIENT_ ORDER_ ID_ ALREADY_ EXISTS STOP_Filling the order would create a guaranteed stop loss order on a short trade, which would be long, while the ask side is halted.LOSS_ ON_ FILL_ GUARANTEED_ ASK_ HALTED STOP_Filling the order would create a guaranteed stop loss order on a long trade, which would be short, while the bid side is halted.LOSS_ ON_ FILL_ GUARANTEED_ BID_ HALTED STOP_Filling the order would create a guaranteed stop loss order for a hedged trade, and the account's configuration does not allow that.LOSS_ ON_ FILL_ GUARANTEED_ HEDGING_ NOT_ ALLOWED STOP_Filling the order would create a stop loss order that would be filled immediately, closing the new trade at a loss.LOSS_ ON_ FILL_ LOSS STOP_Fix recorded Filling the order would not create a stop loss order, and the account's configuration requires every trade to have one.LOSS_ ON_ FILL_ REQUIRED TAKE_Fix recorded Filling the order would have created a take profit order with a client order ID that is already in use.PROFIT_ ON_ FILL_ CLIENT_ ORDER_ ID_ ALREADY_ EXISTS TAKE_Filling the order would create a take profit order that would be filled immediately, closing the new trade at a loss.PROFIT_ ON_ FILL_ LOSS TAKE_Fix recorded Filling the order would create a take profit order whose price would be zero or negative because of the distance specified.PROFIT_ ON_ FILL_ PRICE_ DISTANCE_ MAXIMUM_ EXCEEDED TRAILING_Fix recorded Filling the order would have created a trailing stop loss order with a client order ID that is already in use.STOP_ LOSS_ ON_ FILL_ CLIENT_ ORDER_ ID_ ALREADY_ EXISTS
Reasons used for both a rejection and a cancellation
26 codes
In a rejection or a cancellation, not in the HTTP status.
ACCOUNT_The account is locked.LOCKED ACCOUNT_The account is locked for order creation.ORDER_ CREATION_ LOCKED CLIENT_Fix recorded The client trade ID is already assigned to another open trade.TRADE_ ID_ ALREADY_ EXISTS GUARANTEED_Fix recorded The guaranteed stop loss on fill gives a GTD timestamp that is in the past.STOP_ LOSS_ ON_ FILL_ GTD_ TIMESTAMP_ IN_ PAST GUARANTEED_Filling the order would create a guaranteed stop loss order whose trigger price breaks the account's level restriction price range for guaranteed stop loss orders.STOP_ LOSS_ ON_ FILL_ LEVEL_ RESTRICTION_ PRICE_ RANGE_ EXCEEDED GUARANTEED_Filling the order would create a guaranteed stop loss order whose number of units breaks the account's level restriction volume for guaranteed stop loss orders.STOP_ LOSS_ ON_ FILL_ LEVEL_ RESTRICTION_ VOLUME_ EXCEEDED GUARANTEED_The distance between the guaranteed stop loss 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_ MINIMUM_ DISTANCE_ NOT_ MET GUARANTEED_A guaranteed stop loss on fill was sent, but the account's configuration does not allow guaranteed stop loss orders.STOP_ LOSS_ ON_ FILL_ NOT_ ALLOWED GUARANTEED_Fix recorded The guaranteed stop loss on fill price distance is more than the maximum allowed.STOP_ LOSS_ ON_ FILL_ PRICE_ DISTANCE_ MAXIMUM_ EXCEEDED GUARANTEED_The account's configuration requires guaranteed stop loss orders and the order did not provide one on fill.STOP_ LOSS_ ON_ FILL_ REQUIRED GUARANTEED_Fix recorded The guaranteed stop loss on fill gives a TimeInForce that is not valid.STOP_ LOSS_ ON_ FILL_ TIME_ IN_ FORCE_ INVALID GUARANTEED_Fix recorded The guaranteed stop loss on fill gives a TriggerCondition that is not valid.STOP_ LOSS_ ON_ FILL_ TRIGGER_ CONDITION_ INVALID INSUFFICIENT_The account had too little margin for the action.MARGIN INTERNAL_An unexpected internal server error happened on OANDA's side.SERVER_ ERROR ORDERS_Fix recorded The orders on fill would break the account's rule that only one risk management order can be attached to a trade.ON_ FILL_ RMO_ MUTUAL_ EXCLUSIVITY_ MUTUALLY_ EXCLUSIVE_ VIOLATION PENDING_Creating or filling the order would take the account past the maximum number of pending orders it is allowed.ORDERS_ ALLOWED_ EXCEEDED STOP_Fix recorded The stop loss on fill gives a GTD timestamp that is in the past.LOSS_ ON_ FILL_ GTD_ TIMESTAMP_ IN_ PAST STOP_A guaranteed stop loss on fill was configured and the order's units are more than the account's configured level restriction volume for guaranteed stop loss orders.LOSS_ ON_ FILL_ GUARANTEED_ LEVEL_ RESTRICTION_ EXCEEDED STOP_The distance between the guaranteed stop loss on fill's price and the pending order's price is less than the account's configured minimum guaranteed stop loss distance.LOSS_ ON_ FILL_ GUARANTEED_ MINIMUM_ DISTANCE_ NOT_ MET STOP_A stop loss on fill was explicitly set to be guaranteed, but the account's configuration does not allow guaranteed stop loss orders.LOSS_ ON_ FILL_ GUARANTEED_ NOT_ ALLOWED STOP_A stop loss on fill was explicitly set to be not guaranteed, but the account's configuration requires guaranteed stop loss orders.LOSS_ ON_ FILL_ GUARANTEED_ REQUIRED STOP_Fix recorded The stop loss on fill price distance is more than the maximum allowed.LOSS_ ON_ FILL_ PRICE_ DISTANCE_ MAXIMUM_ EXCEEDED STOP_Fix recorded The stop loss on fill gives a TimeInForce that is not valid.LOSS_ ON_ FILL_ TIME_ IN_ FORCE_ INVALID STOP_Fix recorded The stop loss on fill gives a TriggerCondition that is not valid.LOSS_ ON_ FILL_ TRIGGER_ CONDITION_ INVALID TAKE_Fix recorded The take profit on fill gives a GTD timestamp that is in the past.PROFIT_ ON_ FILL_ GTD_ TIMESTAMP_ IN_ PAST TRAILING_Fix recorded The trailing stop loss on fill GTD timestamp is in the past.STOP_ LOSS_ ON_ FILL_ GTD_ TIMESTAMP_ IN_ PAST
HTTP 400
3 codes
Invalid value specified for 'instrument'Fix recorded Instrument name malformed.STOP_Fix recorded Price has more decimal places than the instrument allows.LOSS_ ON_ FILL_ PRICE_ PRECISION_ EXCEEDED The request was missing required dataFix recorded One or more parameters that the request requires are missing or not valid.
HTTP 401
3 codes
HTTP 401 (invalid or missing token)Fix recorded The access token is invalid or missing.Insufficient authorization to perform request.Fix recorded Usually the host (practice or live) does not match your token or account.The provided request was forbidden.Fix recorded The account ID given is not valid.
HTTP 404
3 codes
HTTP 429
1 code
How to cite this
OANDA API error codes. Broker API Hub, https://openbrokerapi.com/errors/oanda, newest check .
Where you rely on a single figure, cite the source and the checked date printed beside it as well.