Error Codes
Numeric codes are the contract. Use this page — do not keep a local copy of the tables on other docs pages.
Codes show up as REST error_code / code, on WebSocket trade ACKs, and on WebSocket admit (connect / subscribe / JSON). Client buckets (for example RISK_CHECK_FAILED) are for UI and SDK grouping.
1xxx and 3001–3007 / 3013 are a frozen MPC-era sibling catalog. They are not the live CLOB path and are not listed here.
Trade ACK (2xxx, 3008–3015, 4001, 9999)
Retail OrderErrorCode on place / cancel / modify.
| Code | Symbolic | Default English | Client bucket |
|---|---|---|---|
| 2001 | RISK_CHECK_FAILED | order failed risk checks | RISK_CHECK_FAILED |
| 2002 | INSUFFICIENT_COLLATERAL | insufficient balance | INSUFFICIENT_COLLATERAL |
| 2003 | ORDER_NOT_FOUND | order not found | ORDER_NOT_FOUND |
| 2004 | DUPLICATE_ORDER_ID | duplicate order | DUPLICATE_ORDER_ID |
| 2005 | INSUFFICIENT_LIQUIDITY | order could not immediately match against any resting orders | INSUFFICIENT_LIQUIDITY |
| 2006 | POSITION_UNDER_LIQUIDATION | position is being liquidated | POSITION_UNDER_LIQUIDATION |
| 2007 | PRICE_DEVIATION_TOO_LARGE | order price too far from oracle | PRICE_DEVIATION_TOO_LARGE |
| 2008 | LEVERAGE_EXCEEDS_MAX | leverage exceeds max for this market | LEVERAGE_EXCEEDS_MAX |
| 2009 | INSTRUMENT_HALTED | this market is paused | INSTRUMENT_HALTED |
| 2013 | BELOW_MIN_NOTIONAL | order must have minimum value | BELOW_MIN_NOTIONAL |
| 2014 | ORDER_EXCEEDS_COLLATERAL | order is larger than available buying power | EXCEEDS_COLLATERAL_LIMIT |
| 2015 | MARGIN_INSUFFICIENT | insufficient margin to place order | MARGIN_INSUFFICIENT |
| 2016 | CANCEL_TOO_SOON | order cannot be canceled yet | CANCEL_TOO_SOON |
| 2017 | STP_AGGRESSOR_HALTED | self-trade prevention blocked this order | STP_AGGRESSOR_HALTED |
| 2018 | POST_ONLY_WOULD_CROSS | post only order would have immediately matched | POST_ONLY_WOULD_CROSS |
| 2019 | REDUCE_ONLY_REJECTED | reduce only order would increase position | REDUCE_ONLY_REJECTED |
| 2020 | LEVERAGE_UPDATE_MARGIN_INSUFFICIENT | insufficient margin | MARGIN_INSUFFICIENT |
| 2021 | ADJUST_MARGIN_NO_POSITION | no position to adjust | ADJUST_MARGIN_NO_POSITION |
| 2022 | ADJUST_MARGIN_INSUFFICIENT_FREE | insufficient balance | ADJUST_MARGIN_INSUFFICIENT_FREE |
| 2023 | ADJUST_MARGIN_INSUFFICIENT_EXTRA | cannot withdraw more than extra margin | ADJUST_MARGIN_INSUFFICIENT_EXTRA |
| 2024 | ADJUST_MARGIN_BREACHES_WARNING | this withdrawal would put the position below maintenance | ADJUST_MARGIN_BREACHES_WARNING |
| 2025 | FOK_NOT_FILLED | fill or kill could not be fully filled | FOK_NOT_FILLED |
| 2026 | GTD_EXPIRED | order expired | GTD_EXPIRED |
| 2029 | PEG_LIMIT_EXCEEDED | pegged order limit reached | PEG_LIMIT_EXCEEDED |
| 2030 | OPEN_ORDER_LIMIT_EXCEEDED | open order limit reached | OPEN_ORDER_LIMIT_EXCEEDED |
| 2031 | PEG_PRICE_MODIFY_NOT_ALLOWED | pegged order price cannot be edited | PEG_PRICE_MODIFY_NOT_ALLOWED |
| 2032 | ADJUST_MARGIN_INVALID_MODE | margin can only be adjusted on isolated positions | ADJUST_MARGIN_INVALID_MODE |
| 2033 | MARGIN_MODE_SWITCH_DENIED | close the position and cancel open orders first | MARGIN_MODE_SWITCH_DENIED |
| 2034 | INVALID_ORDER_ATTRIBUTES | invalid order | INVALID_ORDER_ATTRIBUTES |
| 2035 | POSITION_LIMIT_EXCEEDED | order would cause position to exceed max size | POSITION_LIMIT_EXCEEDED |
| 2036 | ORACLE_UNAVAILABLE | oracle price unavailable | ORACLE_UNAVAILABLE |
| 2037 | REVERSE_NO_POSITION | no position to reverse | REVERSE_NO_POSITION |
| 3008 | SESSION_EXPIRED | E2E session expired or not established | SESSION_EXPIRED |
| 3009 | E2E_DECRYPTION_FAILED | E2E decryption failed (session key mismatch) | E2E_DECRYPT_FAILED |
| 3011 | SEQUENCER_BUSY | sequencer busy — try again | SYSTEM_UNAVAILABLE |
| 3012 | SEQUENCE_GAP | order sequence gap — missing preceding sequencer mutation | SYSTEM_UNAVAILABLE |
| 3015 | REQUEST_TYPE_MISMATCH | header request_type does not match decrypted body | INTERNAL_ERROR |
| 4001 | EPOCH_STALE | fencing epoch is stale | SYSTEM_UNAVAILABLE |
| 9999 | INTERNAL_ERROR | internal processing error | INTERNAL_ERROR |
Custody REST (5xxx)
Deposit and withdraw.
| Code | Symbolic | Default English |
|---|---|---|
| 5001 | INSUFFICIENT_FREE_COLLATERAL | Insufficient available balance. Close or reduce positions to free margin, then try again. |
| 5002 | INSUFFICIENT_VAULT_LIQUIDITY | The vault does not have enough liquidity for this withdrawal right now. Try a smaller amount or wait and retry. |
| 5003 | BLOCKHASH_EXPIRED | Transaction expired. Please try again. |
| 5004 | INVALID_AMOUNT | Enter a valid amount greater than zero. |
| 5005 | DESTINATION_MISMATCH | Destination does not match this withdrawal. |
| 5006 | MFA_REQUIRED | Two-factor authentication is required for this withdrawal destination. |
| 5007 | PENDING_WITHDRAWAL | A withdrawal is already in progress. Wait for it to finish, then try again. |
| 5008 | WITHDRAW_UNAVAILABLE | Withdrawals are temporarily unavailable. Please try again later. |
| 5009 | PER_TX_CAP_EXCEEDED | This amount exceeds the maximum per withdrawal. Enter a smaller amount. |
| 5010 | DAILY_CAP_EXCEEDED | This amount exceeds the remaining daily withdrawal limit. |
| 5011 | INSUFFICIENT_WALLET_BALANCE | Wallet balance changed. Refresh and try again. |
| 5012 | ZERO_WALLET_BALANCE | No USDC in your wallet to deposit. |
| 5013 | WALLET_NOT_LINKED | No wallet is linked to this account. Reconnect and try again. |
| 5014 | SIGNED_TX_INVALID | Wallet signature was invalid. Please try again. |
| 5099 | CUSTODY_GENERIC | Unable to complete this request. Please try again. |
Account REST (6101+)
API keys, whitelist, export, login. 6001 / 6002 are web-only and not listed here.
| Code | Symbolic | Default English |
|---|---|---|
| 6101 | API_KEYS | Could not update API keys. Please try again. |
| 6102 | ADDRESS_WHITELIST | Could not update your withdraw whitelist. Please try again. |
| 6103 | WALLET_EXPORT | Could not export wallet data. Please try again. |
| 6104 | GATEWAY_LOGIN | Sign-in failed. Please try again. |
| 6105 | ACCOUNT_EXPORT | Could not export account data. Please try again. |
Earn REST (8xxx)
| Code | Symbolic | Default English |
|---|---|---|
| 8001 | EARN_WITHDRAW_COOLDOWN | Withdrawal is still in the cooldown period. |
| 8002 | EARN_POOL_PAUSED | Earn is temporarily paused. |
| 8003 | EARN_POOL_ILLIQUID | The pool can't cover this withdrawal right now. Try a smaller amount. |
| 8004 | EARN_INSUFFICIENT_SHARES | You don't have that many shares to withdraw. |
| 8005 | EARN_INSUFFICIENT_COLLATERAL | Insufficient balance for this deposit. |
| 8006 | EARN_INVALID_AMOUNT | Invalid amount. Enter a positive value. |
| 8099 | EARN_GENERIC | Earn request failed. Please try again. |
Edge WebSocket admit (7xxx)
Connect, subscribe, and inbound JSON.
| Code | Symbolic | Default English |
|---|---|---|
| 7001 | NOT_AUTHENTICATED | Sign in before sending requests on this connection. |
| 7002 | UNKNOWN_API_KEY | Unknown API key. Check your credentials and try again. |
| 7003 | AUTH_TIMEOUT | Authentication timed out. Connect and sign in again. |
| 7004 | TOO_MANY_SESSIONS | Too many sessions for this account. Close another connection and retry. |
| 7101 | MARKET_TIF_INVALID | Market orders require IOC or FOK time in force. |
| 7102 | QUANTITY_MUST_BE_NONZERO | Quantity must be greater than zero. |
| 7103 | BELOW_MIN_NOTIONAL | Order must meet the minimum notional for your tier. |
| 7201 | ALREADY_SUBSCRIBED | Already subscribed to this channel. |
| 7202 | INVALID_POSITIONS_INTERVAL | Invalid positions refresh interval. Allowed values: 2, 5, 10. |
| 7301 | INVALID_JSON | Invalid message JSON. |
| 7302 | MESSAGE_TOO_LARGE | Message exceeds the size limit. |