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.

CodeSymbolicDefault EnglishClient bucket
2001RISK_CHECK_FAILEDorder failed risk checksRISK_CHECK_FAILED
2002INSUFFICIENT_COLLATERALinsufficient balanceINSUFFICIENT_COLLATERAL
2003ORDER_NOT_FOUNDorder not foundORDER_NOT_FOUND
2004DUPLICATE_ORDER_IDduplicate orderDUPLICATE_ORDER_ID
2005INSUFFICIENT_LIQUIDITYorder could not immediately match against any resting ordersINSUFFICIENT_LIQUIDITY
2006POSITION_UNDER_LIQUIDATIONposition is being liquidatedPOSITION_UNDER_LIQUIDATION
2007PRICE_DEVIATION_TOO_LARGEorder price too far from oraclePRICE_DEVIATION_TOO_LARGE
2008LEVERAGE_EXCEEDS_MAXleverage exceeds max for this marketLEVERAGE_EXCEEDS_MAX
2009INSTRUMENT_HALTEDthis market is pausedINSTRUMENT_HALTED
2013BELOW_MIN_NOTIONALorder must have minimum valueBELOW_MIN_NOTIONAL
2014ORDER_EXCEEDS_COLLATERALorder is larger than available buying powerEXCEEDS_COLLATERAL_LIMIT
2015MARGIN_INSUFFICIENTinsufficient margin to place orderMARGIN_INSUFFICIENT
2016CANCEL_TOO_SOONorder cannot be canceled yetCANCEL_TOO_SOON
2017STP_AGGRESSOR_HALTEDself-trade prevention blocked this orderSTP_AGGRESSOR_HALTED
2018POST_ONLY_WOULD_CROSSpost only order would have immediately matchedPOST_ONLY_WOULD_CROSS
2019REDUCE_ONLY_REJECTEDreduce only order would increase positionREDUCE_ONLY_REJECTED
2020LEVERAGE_UPDATE_MARGIN_INSUFFICIENTinsufficient marginMARGIN_INSUFFICIENT
2021ADJUST_MARGIN_NO_POSITIONno position to adjustADJUST_MARGIN_NO_POSITION
2022ADJUST_MARGIN_INSUFFICIENT_FREEinsufficient balanceADJUST_MARGIN_INSUFFICIENT_FREE
2023ADJUST_MARGIN_INSUFFICIENT_EXTRAcannot withdraw more than extra marginADJUST_MARGIN_INSUFFICIENT_EXTRA
2024ADJUST_MARGIN_BREACHES_WARNINGthis withdrawal would put the position below maintenanceADJUST_MARGIN_BREACHES_WARNING
2025FOK_NOT_FILLEDfill or kill could not be fully filledFOK_NOT_FILLED
2026GTD_EXPIREDorder expiredGTD_EXPIRED
2029PEG_LIMIT_EXCEEDEDpegged order limit reachedPEG_LIMIT_EXCEEDED
2030OPEN_ORDER_LIMIT_EXCEEDEDopen order limit reachedOPEN_ORDER_LIMIT_EXCEEDED
2031PEG_PRICE_MODIFY_NOT_ALLOWEDpegged order price cannot be editedPEG_PRICE_MODIFY_NOT_ALLOWED
2032ADJUST_MARGIN_INVALID_MODEmargin can only be adjusted on isolated positionsADJUST_MARGIN_INVALID_MODE
2033MARGIN_MODE_SWITCH_DENIEDclose the position and cancel open orders firstMARGIN_MODE_SWITCH_DENIED
2034INVALID_ORDER_ATTRIBUTESinvalid orderINVALID_ORDER_ATTRIBUTES
2035POSITION_LIMIT_EXCEEDEDorder would cause position to exceed max sizePOSITION_LIMIT_EXCEEDED
2036ORACLE_UNAVAILABLEoracle price unavailableORACLE_UNAVAILABLE
2037REVERSE_NO_POSITIONno position to reverseREVERSE_NO_POSITION
3008SESSION_EXPIREDE2E session expired or not establishedSESSION_EXPIRED
3009E2E_DECRYPTION_FAILEDE2E decryption failed (session key mismatch)E2E_DECRYPT_FAILED
3011SEQUENCER_BUSYsequencer busy — try againSYSTEM_UNAVAILABLE
3012SEQUENCE_GAPorder sequence gap — missing preceding sequencer mutationSYSTEM_UNAVAILABLE
3015REQUEST_TYPE_MISMATCHheader request_type does not match decrypted bodyINTERNAL_ERROR
4001EPOCH_STALEfencing epoch is staleSYSTEM_UNAVAILABLE
9999INTERNAL_ERRORinternal processing errorINTERNAL_ERROR

Custody REST (5xxx)

Deposit and withdraw.

CodeSymbolicDefault English
5001INSUFFICIENT_FREE_COLLATERALInsufficient available balance. Close or reduce positions to free margin, then try again.
5002INSUFFICIENT_VAULT_LIQUIDITYThe vault does not have enough liquidity for this withdrawal right now. Try a smaller amount or wait and retry.
5003BLOCKHASH_EXPIREDTransaction expired. Please try again.
5004INVALID_AMOUNTEnter a valid amount greater than zero.
5005DESTINATION_MISMATCHDestination does not match this withdrawal.
5006MFA_REQUIREDTwo-factor authentication is required for this withdrawal destination.
5007PENDING_WITHDRAWALA withdrawal is already in progress. Wait for it to finish, then try again.
5008WITHDRAW_UNAVAILABLEWithdrawals are temporarily unavailable. Please try again later.
5009PER_TX_CAP_EXCEEDEDThis amount exceeds the maximum per withdrawal. Enter a smaller amount.
5010DAILY_CAP_EXCEEDEDThis amount exceeds the remaining daily withdrawal limit.
5011INSUFFICIENT_WALLET_BALANCEWallet balance changed. Refresh and try again.
5012ZERO_WALLET_BALANCENo USDC in your wallet to deposit.
5013WALLET_NOT_LINKEDNo wallet is linked to this account. Reconnect and try again.
5014SIGNED_TX_INVALIDWallet signature was invalid. Please try again.
5099CUSTODY_GENERICUnable to complete this request. Please try again.

Account REST (6101+)

API keys, whitelist, export, login. 6001 / 6002 are web-only and not listed here.

CodeSymbolicDefault English
6101API_KEYSCould not update API keys. Please try again.
6102ADDRESS_WHITELISTCould not update your withdraw whitelist. Please try again.
6103WALLET_EXPORTCould not export wallet data. Please try again.
6104GATEWAY_LOGINSign-in failed. Please try again.
6105ACCOUNT_EXPORTCould not export account data. Please try again.

Earn REST (8xxx)

CodeSymbolicDefault English
8001EARN_WITHDRAW_COOLDOWNWithdrawal is still in the cooldown period.
8002EARN_POOL_PAUSEDEarn is temporarily paused.
8003EARN_POOL_ILLIQUIDThe pool can't cover this withdrawal right now. Try a smaller amount.
8004EARN_INSUFFICIENT_SHARESYou don't have that many shares to withdraw.
8005EARN_INSUFFICIENT_COLLATERALInsufficient balance for this deposit.
8006EARN_INVALID_AMOUNTInvalid amount. Enter a positive value.
8099EARN_GENERICEarn request failed. Please try again.

Edge WebSocket admit (7xxx)

Connect, subscribe, and inbound JSON.

CodeSymbolicDefault English
7001NOT_AUTHENTICATEDSign in before sending requests on this connection.
7002UNKNOWN_API_KEYUnknown API key. Check your credentials and try again.
7003AUTH_TIMEOUTAuthentication timed out. Connect and sign in again.
7004TOO_MANY_SESSIONSToo many sessions for this account. Close another connection and retry.
7101MARKET_TIF_INVALIDMarket orders require IOC or FOK time in force.
7102QUANTITY_MUST_BE_NONZEROQuantity must be greater than zero.
7103BELOW_MIN_NOTIONALOrder must meet the minimum notional for your tier.
7201ALREADY_SUBSCRIBEDAlready subscribed to this channel.
7202INVALID_POSITIONS_INTERVALInvalid positions refresh interval. Allowed values: 2, 5, 10.
7301INVALID_JSONInvalid message JSON.
7302MESSAGE_TOO_LARGEMessage exceeds the size limit.