error.slug and error.code next to its human-readable text; the Error Reference describes the shape per transport and the codes 0001–0014 shared by every route. The codes below belong to one route each: 1xxx createOrder, 2xxx cancelOrder, 3xxx modifyOrder, 6xxx rejectOrder, 7xxx updateLeverage, 8xxx updateMargin, 9xxx updateMarginMode.
createOrder
| Error Code | Error Slug | Server Status Code | Meaning |
|---|---|---|---|
| 1000 | CREATE_ORDER_ERROR | 400, 500 | A create failure none of the codes below names. |
| 1001 | CREATE_ORDER_INSUFFICIENT_BALANCE | 400 | Available balance does not cover the order’s margin. |
| 1002 | CREATE_ORDER_INVALID_TRADE | 400 | A trading rule none of the codes below names, for example a bad price or quantity. |
| 1003 | CREATE_ORDER_RECEIVE_WINDOW | 400 | The order reached the engine after the receive window and was rejected. |
| 1004 | CREATE_ORDER_MAX_OPEN_ORDERS | 400 | The per-market open-orders cap is reached. |
| 1005 | CREATE_ORDER_BANNED | 403 | An order creation ban is in force; retryAfterSec says for how long. |
| 1006 | CREATE_ORDER_REDUCE_ONLY | 400 | A reduce-only rule: there is no open position, or the quantity exceeds it. |
| 1007 | CREATE_ORDER_SELF_TRADE | 400 | The order would trade against one of your own resting orders. |
| 1008 | CREATE_ORDER_PRICE_BAND | 400 | The price is too far from the mark or index price. |
| 1009 | CREATE_ORDER_CONFLICT | 409 | The order’s state moved on while the command was in flight. Look the order up before deciding what to do. |
cancelOrder
| Error Code | Error Slug | Server Status Code | Meaning |
|---|---|---|---|
| 2000 | CANCEL_ORDER_ERROR | 400, 500 | A cancel failure none of the codes below names. |
| 2001 | CANCEL_ORDER_CONFLICT_ERROR | 409 | The cancel lost a race with a fill or another update and was not applied. Send it again as is. |
| 2002 | CANCEL_ORDER_ALREADY_CANCELLING | 409 | Another cancel of the same order is already in flight; its answer follows on this connection. Do not resend. |
| 2003 | CANCEL_ORDER_NOT_CANCELLABLE | 400, 409 | The order is filled, cancelled, rejected, or a liquidation order. Nothing to cancel. |
modifyOrder
| Error Code | Error Slug | Server Status Code | Meaning |
|---|---|---|---|
| 3000 | MODIFY_ORDER_ERROR | 400, 500 | A modify failure none of the codes below names. |
| 3001 | MODIFY_ORDER_INSUFFICIENT_BALANCE | 400 | Available balance does not cover the modified order’s margin. |
| 3002 | MODIFY_ORDER_INVALID_TRADE | 400 | A trading rule none of the codes below names. |
| 3003 | MODIFY_ORDER_NOT_FOUND_ERROR | 404 | No order with that id for this account. |
| 3004 | MODIFY_ORDER_CONFLICT_ERROR | 409 | The modify lost a race with another update and was not applied. |
| 3005 | MODIFY_ORDER_NOT_ACTIVE | 400, 409 | Only an active order can be modified. |
| 3006 | MODIFY_ORDER_RECEIVE_WINDOW | 400 | The replacement order reached the engine after the receive window. |
| 3007 | MODIFY_ORDER_MAX_OPEN_ORDERS | 400 | The replacement order would exceed the per-market open-orders cap. |
| 3008 | MODIFY_ORDER_REDUCE_ONLY | 400 | A reduce-only rule on the replacement order. |
| 3009 | MODIFY_ORDER_WOULD_MATCH | 400 | The modified post-only price would take liquidity. |
| 3010 | PARTIAL_FILL_ORDER_ERROR | 500 | Internal failure while recording a partial fill. |
| 3011 | MODIFY_ORDER_STATE_CHANGED | 409 | The original order filled or was cancelled while the modify was in flight. |
| 3012 | MODIFY_ORDER_SELF_TRADE | 400 | The replacement order would trade against one of your own resting orders. |
| 3013 | MODIFY_ORDER_PRICE_BAND | 400 | The modified price is too far from the mark or index price. |
| 3020 | COMPLETE_FILL_ORDER_ERROR | 500 | Internal failure while recording a complete fill. |
rejectOrder
Pushed after an order was accepted, on the Order Creation Stream.| Error Code | Error Slug | Server Status Code | Meaning |
|---|---|---|---|
| 6000 | ORDER_REJECTED | 400, 500 | A rejection none of the codes below names. |
| 6001 | ORDER_REJECTED_POST_ONLY | 400 | A post-only order would have matched immediately and was rejected. |
updateLeverage
| Error Code | Error Slug | Server Status Code | Meaning |
|---|---|---|---|
| 7000 | UPDATE_LEVERAGE_ERROR | 400, 500 | A leverage update failure none of the codes below names. |
| 7001 | UPDATE_LEVERAGE_ALREADY_SET | 400 | The market already uses the requested leverage. |
| 7002 | UPDATE_LEVERAGE_NOT_ALLOWED | 400 | Open positions or orders in the market forbid the change. |
updateMargin
| Error Code | Error Slug | Server Status Code | Meaning |
|---|---|---|---|
| 8000 | UPDATE_MARGIN_ERROR | 400, 500 | A margin update failure none of the codes below names. |
| 8001 | UPDATE_MARGIN_NO_POSITION | 400 | No position in the market. |
| 8002 | UPDATE_MARGIN_NOT_ISOLATED | 400 | Margin can only be updated on an isolated-margin position. |
| 8003 | UPDATE_MARGIN_EXCEEDS_AVAILABLE | 400 | The increase exceeds available balance. |
| 8004 | UPDATE_MARGIN_BELOW_MINIMUM | 400 | The decrease would leave less than the minimum required margin. |
| 8005 | UPDATE_MARGIN_CONFLICT | 409 | The position’s margin was updated by another request in the meantime. Send it again. |
updateMarginMode
| Error Code | Error Slug | Server Status Code | Meaning |
|---|---|---|---|
| 9001 | UPDATE_MARGIN_MODE_MARKET_IN_USE | 400 | Open positions or orders in the market forbid the change. |