error.slug and error.code next to its human-readable text; the Error Reference describes the shape per transport and the SYS codes shared by every route. Perpetuals codes are PRP, one route per block: PRP-01xx createOrder, PRP-02xx cancelOrder, PRP-03xx modifyOrder, PRP-06xx rejectOrder, PRP-07xx updateLeverage, PRP-08xx updateMargin, PRP-09xx updateMarginMode.
createOrder
| Error Code | Error Slug | Server Status Code | Meaning |
|---|---|---|---|
| PRP-0100 | CREATE_ORDER_ERROR | 400, 500 | A create failure none of the codes below names. |
| PRP-0101 | CREATE_ORDER_INSUFFICIENT_BALANCE | 400 | Available balance does not cover the order’s margin. |
| PRP-0102 | CREATE_ORDER_INVALID_TRADE | 400 | A trading rule none of the codes below names, for example a bad price or quantity. |
| PRP-0103 | CREATE_ORDER_RECEIVE_WINDOW | 400 | The order reached the engine after the receive window and was rejected. |
| PRP-0104 | CREATE_ORDER_MAX_OPEN_ORDERS | 400 | The per-market open-orders cap is reached. |
| PRP-0105 | CREATE_ORDER_BANNED | 403 | An order creation ban is in force; retryAfterSec says for how long. |
| PRP-0106 | CREATE_ORDER_REDUCE_ONLY | 400 | A reduce-only rule: there is no open position, or the quantity exceeds it. |
| PRP-0107 | CREATE_ORDER_SELF_TRADE | 400 | The order would trade against one of your own resting orders. |
| PRP-0108 | CREATE_ORDER_PRICE_BAND | 400 | The price is too far from the mark or index price. |
| PRP-0109 | 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 |
|---|---|---|---|
| PRP-0200 | CANCEL_ORDER_ERROR | 400, 500 | A cancel failure none of the codes below names. |
| PRP-0201 | 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. |
| PRP-0202 | CANCEL_ORDER_ALREADY_CANCELLING | 409 | Another cancel of the same order is already in flight; its answer follows on this connection. Do not resend. |
| PRP-0203 | 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 |
|---|---|---|---|
| PRP-0300 | MODIFY_ORDER_ERROR | 400, 500 | A modify failure none of the codes below names. |
| PRP-0301 | MODIFY_ORDER_INSUFFICIENT_BALANCE | 400 | Available balance does not cover the modified order’s margin. |
| PRP-0302 | MODIFY_ORDER_INVALID_TRADE | 400 | A trading rule none of the codes below names. |
| PRP-0303 | MODIFY_ORDER_NOT_FOUND_ERROR | 404 | No order with that id for this account. |
| PRP-0304 | MODIFY_ORDER_CONFLICT_ERROR | 409 | The modify lost a race with another update and was not applied. |
| PRP-0305 | MODIFY_ORDER_NOT_ACTIVE | 400, 409 | Only an active order can be modified. |
| PRP-0306 | MODIFY_ORDER_RECEIVE_WINDOW | 400 | The replacement order reached the engine after the receive window. |
| PRP-0307 | MODIFY_ORDER_MAX_OPEN_ORDERS | 400 | The replacement order would exceed the per-market open-orders cap. |
| PRP-0308 | MODIFY_ORDER_REDUCE_ONLY | 400 | A reduce-only rule on the replacement order. |
| PRP-0309 | MODIFY_ORDER_WOULD_MATCH | 400 | The modified post-only price would take liquidity. |
| PRP-0310 | PARTIAL_FILL_ORDER_ERROR | 500 | Internal failure while recording a partial fill. |
| PRP-0311 | COMPLETE_FILL_ORDER_ERROR | 500 | Internal failure while recording a complete fill. |
| PRP-0312 | MODIFY_ORDER_STATE_CHANGED | 409 | The original order filled or was cancelled while the modify was in flight. |
| PRP-0313 | MODIFY_ORDER_SELF_TRADE | 400 | The replacement order would trade against one of your own resting orders. |
| PRP-0314 | MODIFY_ORDER_PRICE_BAND | 400 | The modified price is too far from the mark or index price. |
rejectOrder
Pushed after an order was accepted, on the Order Creation Stream.| Error Code | Error Slug | Server Status Code | Meaning |
|---|---|---|---|
| PRP-0600 | ORDER_REJECTED | 400, 500 | A rejection none of the codes below names. |
| PRP-0601 | 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 |
|---|---|---|---|
| PRP-0700 | UPDATE_LEVERAGE_ERROR | 400, 500 | A leverage update failure none of the codes below names. |
| PRP-0701 | UPDATE_LEVERAGE_ALREADY_SET | 400 | The market already uses the requested leverage. |
| PRP-0702 | UPDATE_LEVERAGE_NOT_ALLOWED | 400 | Open positions or orders in the market forbid the change. |
updateMargin
| Error Code | Error Slug | Server Status Code | Meaning |
|---|---|---|---|
| PRP-0800 | UPDATE_MARGIN_ERROR | 400, 500 | A margin update failure none of the codes below names. |
| PRP-0801 | UPDATE_MARGIN_NO_POSITION | 400 | No position in the market. |
| PRP-0802 | UPDATE_MARGIN_NOT_ISOLATED | 400 | Margin can only be updated on an isolated-margin position. |
| PRP-0803 | UPDATE_MARGIN_EXCEEDS_AVAILABLE | 400 | The increase exceeds available balance. |
| PRP-0804 | UPDATE_MARGIN_BELOW_MINIMUM | 400 | The decrease would leave less than the minimum required margin. |
| PRP-0805 | 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 |
|---|---|---|---|
| PRP-0901 | UPDATE_MARGIN_MODE_MARKET_IN_USE | 400 | Open positions or orders in the market forbid the change. |