Portail dév.
Thème

Error#

API Error Codes#

Error CodeError NameDescription
80000SIGN_VERIFY_FAILEDSignature verification failed. The signature is invalid or the request was modified.
80010NONCE_REPLAYEDThe request was submitted more than once.
80020ACTION_TYPE_MISMATCHThe action type does not match the endpoint.
80030ILLEGAL_PARAMETERInvalid parameter or empty request body.
80031MISSING_CLIENT_ORDER_IDMissing clientOrderId.
80032ACCOUNT_NOT_SETUPThe user does not have an on-chain smart account or wallet.
80033LEVERAGE_TOO_LOWLeverage is below the minimum value.
80034LEVERAGE_PRECISION_INVALIDInvalid leverage precision.
80035MARGIN_MODE_INVALIDInvalid margin mode.
80036POSITION_DIRECTION_INVALIDInvalid position direction.
80037LEVERAGE_EXCEEDS_TIERLeverage exceeds the current tier limit.
80038INSTRUMENT_ISOLATED_ONLYThis contract supports isolated margin only and cannot be switched to cross margin.
80039ISOLATED_POSITION_NOT_FOUNDNo isolated position exists for the asset when adjusting margin.
80040RATE_LIMITEDRequest frequency exceeded the limit.
80041ORDERS_STILL_EXISTOpen orders still exist for the contract before switching margin mode.
80042REDUCE_ONLY_TPSL_FORBIDDENA Reduce-Only order cannot include TPSL.
80043PARTIAL_POSITION_TPSL_FIELD_IMMUTABLEAn immutable field of a partial-position TPSL order was modified.
80044ORDER_SIZE_BELOW_MINIMUMOrder size is below minTradeAmount.
80045INVALID_CLIENT_ORDER_IDInvalid clientOrderId format, region, or source.
80050FEATURE_RESTRICTEDThe feature is restricted by the user’s region or compliance policy.
80058CALLDATA_INVALIDInvalid calldata or action payload.
80060AGENT_NOT_AUTHORIZEDThe recovered signing address is not a valid Agent for the current OpenAPI user.
80061CREATE_SUB_ACCOUNT_NOT_ALLOWEDThe main account is not allowed to create subaccounts.
80062EXCHANGE_OS_TRADE_FROZENAll Exchange OS trading operations are frozen for the user.
80063EXCHANGE_OS_SPOT_BUY_FROZENSpot buying is frozen for the user.
80064EXCHANGE_OS_SPOT_TRADE_FROZENSpot trading is frozen for the user.
80065EXCHANGE_OS_PERP_OPEN_FROZENPerps opening or position-increasing operations are frozen for the user.
80066EXCHANGE_OS_MARGIN_TRANSFER_FROZENIsolated margin reduction or margin-mode switching is frozen for the user.
80067API_KEY_AUTHENTICATION_FAILEDOpenAPI API Key, signature, timestamp, Passphrase, or permission authentication failed.
80068OPENAPI_AUTH_CROSS_SITE_NOT_SUPPORTEDThe endpoint does not support cross-site API Keys.
80069OPENAPI_AUTH_API_FROZENThe API Key has been frozen.
80070OPENAPI_AUTH_ENVIRONMENT_MISMATCHThe API Key does not match the current Broker domain.
80071OPENAPI_AUTH_TIMESTAMP_EXPIREDThe request timestamp has expired.
80072OPENAPI_AUTH_ACCESS_KEY_REQUIREDMissing OK-ACCESS-KEY header.
80073OPENAPI_AUTH_PASSPHRASE_REQUIREDMissing OK-ACCESS-PASSPHRASE header.
80074OPENAPI_AUTH_PASSPHRASE_INVALIDInvalid OK-ACCESS-PASSPHRASE.
80075OPENAPI_AUTH_SIGNATURE_REQUIREDMissing OK-ACCESS-SIGN header.
80076OPENAPI_AUTH_TIMESTAMP_REQUIREDMissing OK-ACCESS-TIMESTAMP header.
80077OPENAPI_AUTH_BROKER_ID_MISMATCHThe API Key Broker ID does not match.
80078OPENAPI_AUTH_IP_INVALIDThe request IP is invalid or not on the whitelist.
80079OPENAPI_AUTH_ACCESS_KEY_INVALIDInvalid OK-ACCESS-KEY.
80080OPENAPI_AUTH_TIMESTAMP_INVALIDInvalid OK-ACCESS-TIMESTAMP.
80081OPENAPI_AUTH_SIGNATURE_INVALIDInvalid request signature.
80082OPENAPI_AUTH_AUTHORITY_INVALIDInvalid API Key authority.
80083OPENAPI_AUTH_REQUEST_METHOD_INVALIDInvalid request method.
80084OPENAPI_AUTH_API_KEY_NOT_FOUNDAPI Key does not exist.
80085OPENAPI_AUTH_PERMISSION_DENIEDThe API Key does not have the required permission.
80086OPENAPI_AUTH_COLO_RESTRICTEDThe request was blocked by a data-center or IP restriction policy.
80087OPENAPI_AUTH_BASE_COIN_NOT_PERMITTEDThe API Key does not have trading permission for the asset.
80088OPENAPI_AUTH_BIZ_LINE_NOT_PERMITTEDThe API Key does not have permission for the business line.
80101INVALID_ARGUMENTInvalid argument, such as an oversized request body, invalid format, or backend rejection.
80102RESOURCE_NOT_FOUNDThe requested resource does not exist.
80103NOT_LEADERThe current service node cannot process the request. Retry later.
80104DUPLICATE_TXDuplicate request. The transaction has already been submitted.
80105CONFLICTState conflict. The resource is busy; retry later.
80106TX_NOT_CONFIRMEDThe request was accepted but not confirmed before timeout. Query the result later.
80107INTERNAL_ERRORInternal server error.
80108NO_MARKET_DATAThe request is valid, but the upstream market-data source returned no data.
80109INDEX_NOT_FOUNDThe requested market index does not exist.
80110GATEWAY_TIMEOUTRequest timed out and the result is unknown.
80111USER_NOT_FOUNDThe requested user does not exist.
80200INVALID_TRANSACTIONInvalid transaction.
80201GENERIC_MESSAGEGeneric error message.
80202INSUFFICIENT_BALANCEInsufficient balance.
80203INSUFFICIENT_MARGINInsufficient margin.
80204NONCE_VALIDATION_FAILEDOn-chain transaction nonce validation failed.
80205ACCOUNT_NOT_FOUNDAccount does not exist.
80206INVALID_SUB_ACCOUNTInvalid subaccount operation.
80207INVALID_REFERRALInvalid referral operation.
80208ASSET_NOT_FOUNDInstrument or asset does not exist.
80209PORTFOLIO_NOT_FOUNDPortfolio does not exist.
80210ORDER_NOT_FOUNDOrder does not exist.
80211MARGIN_TABLE_NOT_FOUNDMargin tier table does not exist.
80212EXECUTION_FAILEDExecution failed.
80213UNAUTHORIZEDUnauthorized.
80214BALANCE_OVERFLOWBalance overflow.
80215MARK_PRICE_NOT_FOUNDMark price is unavailable.
80216POSITION_NOT_FOUNDPosition does not exist.
80217MARGIN_CALCULATION_FAILEDMargin calculation failed.
80218ORDER_EXECUTION_FAILEDFOK was not fully filled, IOC had no liquidity, or Post-Only would cross the market.
80219ASSET_HALTEDTrading for the asset is suspended.
80220ALREADY_EXISTSThe resource or state already exists.
80221RATE_LIMITED_CHAINOn-chain operation limit exhausted and the throttling interval has not elapsed.
80222EXCEED_CANCEL_ALL_LIMITCancel-All daily limit exceeded.
80223EXCEED_OPEN_ORDER_LIMITOpen-order limit exceeded.
80224BALANCE_NOT_FOUNDBalance for the specified Token does not exist.
80225MULTISIG_SINGLE_SIGN_DISALLOWEDA multisig account cannot use the single-signature path.
80226MULTISIG_TARGET_NOW_NORMALThe target user is no longer a multisig account.
80227MULTISIG_THRESHOLD_NOT_METThe multisig threshold has not been met.
80228MULTISIG_OUTER_SIGNER_INVALIDInvalid multisig outer signer.
80229MULTISIG_INNER_DIGEST_FAILEDFailed to calculate the multisig inner digest.
80230ORDER_BELOW_MIN_NOTIONALOrder notional is below the market minimum.
80231TOKEN_NOT_FOUNDToken does not exist.
80232FILL_NOT_FOUNDFill does not exist or does not belong to the user.
80233CASHFLOW_NOT_FOUNDCash-flow or bill record does not exist or does not belong to the user.
80234POST_ONLY_WOULD_CROSSPost-Only order would execute immediately.
80235PRICE_OUTSIDE_LIMIT_BANDLimit price is outside the price band.
80236BUY_PRICE_DEVIATES_BELOW_MIDBuy price is below the allowed deviation threshold from the mid price.
80237ORDER_ABOVE_MAX_NOTIONALOrder notional exceeds the maximum limit.
80238OPEN_INTEREST_EXCEEDS_PLATFORMOpen interest exceeds the platform limit.
80239OPEN_INTEREST_EXCEEDS_USEROpen interest exceeds the user limit.
80240PLACE_TIER_NOTIONAL_EXCEEDEDOrder exceeds the current tier notional limit.
80241PLACE_INSUFFICIENT_MARGINInsufficient margin to place the order.
80242REDUCE_ONLY_NO_POSITIONNo corresponding position exists for the Reduce-Only order.
80243CLOSE_SIZE_EXCEEDS_POSITIONClose size exceeds the position size.
80244ASSET_SETTLEMENT_PENDINGAsset settlement is in progress; only Reduce-Only orders are allowed.
80245TRIGGER_PRICE_EQUALS_REFERENCETrigger price equals the reference price.
80246ALGO_SIZE_EXCEEDS_POSITIONAlgo order size exceeds the position size.
80247POSITION_TPSL_SIZE_EXCEEDS_POSITIONPosition TPSL size exceeds the position size.
80248STOP_ORDER_MODIFY_TARGET_NOT_FOUNDStop-order modification target does not exist or has already triggered.
80249TPSL_DIRECTION_AGAINST_PARENTTPSL direction conflicts with the parent order.
80250TP_LIMIT_PRICE_AGAINST_PARENTTP limit price is on the wrong side of the parent order.
80251TPSL_TRIGGER_CROSSED_REFERENCEPosition TPSL trigger price has already crossed the reference price.
80252TPSL_DUPLICATE_ON_PARENTAn order can contain only one TP and one SL.
80253ENTIRE_POSITION_TPSL_DUPLICATEEach entire position can have only one TP and one SL group.
80254OA_TRIGGER_MARKET_CHILD_IMMUTABLEOA trigger-market child order cannot be modified.
80255OA_TRIGGER_LIMIT_AMOUNT_IMMUTABLEOA trigger-limit child order amount cannot be modified.
80256OA_TP_LIMIT_CHILD_IMMUTABLEOA TP-limit child order cannot be modified.
80257ENTIRE_POSITION_TPSL_SIZE_IMMUTABLEEntire-position TPSL size cannot be modified.
80258POSITION_MODE_SWITCH_BLOCKEDPosition mode cannot be switched while open orders or positions exist.
80259LEVERAGE_ORDERS_EXCEED_LIMITOpen-order count exceeds the limit when adjusting leverage.
80260LEVERAGE_INSUFFICIENT_MARGIN_CROSSInsufficient margin when adjusting cross-margin leverage.
80261ISOLATED_MARGIN_TRANSFER_INSUFFICIENTInsufficient isolated margin for the transfer.
80262MARGIN_ADJUST_INSUFFICIENTMargin is insufficient after the adjustment.
80263MARGIN_ADJUST_AVAILABLE_INSUFFICIENTAvailable balance is insufficient for the margin adjustment.
80264LEVERAGE_INSUFFICIENT_MARGIN_ISOLATEDInsufficient margin when adjusting isolated leverage.
80265MODIFY_TARGET_NOT_FOUNDModification target does not exist or is in a terminal state.
80266MODIFY_ASSET_SETTLEMENT_PENDINGModification rejected because asset settlement is in progress.
80267PLAN_MODIFY_TRIGGER_PRICE_EQUALS_REFERENCEModified plan-order trigger price equals the reference price.
80268TPSL_MODIFY_TRIGGER_PRICE_EQUALS_REFERENCEModified position TPSL trigger price equals the reference price.
80269PLAN_TRIGGER_CROSSED_REFERENCEPlan-order trigger direction is invalid.
80270PLAN_MODIFY_TRIGGER_CROSSED_REFERENCEModified plan-order trigger direction is invalid.
80271TPSL_MODIFY_TRIGGER_CROSSED_REFERENCEModified position TPSL trigger price has crossed the reference price.
80272TPSL_MODIFY_SIZE_EXCEEDS_POSITIONModified position TPSL size exceeds the position size.
80273CANCEL_CLOID_NOT_MATCHEDNo cancel target was found for the specified clientOrderId.
80274MODIFY_CLOID_NOT_MATCHEDNo modification target was found for the specified clientOrderId.
80275PLAN_MODIFY_CLOID_NOT_MATCHEDNo plan-order modification target was found or the order has already triggered.
80276MARKET_KIND_NOT_SUPPORTEDThe submitted market type is not supported for this operation.
80277WIRE_MARKET_TYPE_MISMATCHRequest marketType does not match the market type associated with assetId.
80278MARKET_TRIGGER_PRICE_IMMUTABLEExecution price of a market-triggered TPSL order cannot be modified.
80279PLAN_MARKET_TRIGGER_PRICE_IMMUTABLEExecution price of a market-triggered plan order cannot be modified.
80280TP_LIMIT_PRICE_AGAINST_LATESTTP limit price is on the wrong side of the latest price.
80281MARGIN_MODE_LEVERAGE_MISMATCHBefore switching from isolated to cross margin, long and short leverage must be equal.
80282MARGIN_MODE_INSUFFICIENT_TO_CROSSInsufficient cross margin after switching from isolated to cross margin.
80283MARGIN_MODE_INSUFFICIENT_TO_ISOLATEDInsufficient available margin when switching from cross to isolated margin.
80284MODIFY_PARENT_PRICE_CONFLICTS_WITH_TPSLModified parent-order price conflicts with an attached TPSL trigger price.
80285ISOLATED_POSITION_TIER_SWAP_MARGIN_INSUFFICIENTEquity is insufficient to cover maintenance margin and liquidation fees after an isolated position tier migration.
80286IOC_NO_LIQUIDITYIOC or FrontMarketIoc order has no immediately available liquidity.
80287TPSL_WIRE_SHAPE_INVALIDTPSL or plan-order wire structure is invalid.
80288MULTISIG_INNER_ACTION_NOT_ALLOWEDThe multisig envelope contains an unsupported inner action type.
80289MULTISIG_ENVELOPE_RECONFIG_REJECTEDMultisig envelope reconfiguration is not allowed; only multisig removal is supported.
80290MULTISIG_INNER_SIGNATURE_COUNT_INVALIDInner signature count exceeds the allowed range.
80291MULTISIG_OUTER_SIGNER_IS_SELFA multisig account cannot act as its own outer signer.
80900BACKEND_UNAVAILABLEBackend is unreachable or unavailable.
80901SUBMIT_FAILEDRequest passed validation but failed during backend submission.
80902NOT_YET_ENABLEDThe endpoint is defined but the downstream function is not enabled.
80903RPC_DATA_EMPTYRPC returned an empty Data object.

Public WebSocket Error Codes#

Error CodeError NameDescription
60017UNRECOGNIZED_URLInvalid connection URL.
60014LIMIT_EXCEEDEDRequests were sent too quickly. Per-connection rate limiting uses a token bucket with a capacity of 480 tokens and a refill rate of 480 tokens per hour.
60012UNRECOGNIZED_REQUESTThe server cannot parse the message. The message is not valid JSON, op is unsupported, or args is an empty array. The entire request is discarded and is not partially applied.
60033REQUEST_ID_NOT_LOGICALThe request id is invalid, such as being too long or containing unsupported characters. The id is optional, but must be valid when provided.
60013INVALID_ARGSAn element in the args array is null. Only that element is rejected; other arguments in the same request are processed normally.
60018CHANNEL_NOT_EXISTThe channel name is invalid or unavailable in the current environment. This may also occur when assetId is missing, empty, or does not exist in the current environment.
4004ws closeThe server received no data from the connection for 30 consecutive seconds and closed it. Close reason: No data received in 30s. Clients should send periodic heartbeats even without business requests.
4006ABNORMAL_DISCONNECTIONThe server abandoned the connection because of an unexpected internal or network error, or because the market-data dispatch queue was full. Reconnect and resubscribe.

Private WebSocket Error Codes#

Error CodeError NameDescription
60017UNRECOGNIZED_URLInvalid connection URL.
60014LIMIT_EXCEEDEDRequests were sent too quickly. Per-connection rate limiting uses a token bucket with a capacity of 480 tokens and a refill rate of 480 tokens per hour.
60033REQUEST_ID_NOT_LOGICALThe id in a login or subscription request is invalid. The entire request is discarded.
60012UNRECOGNIZED_REQUESTThe login request cannot be parsed because args is missing, empty, or contains a null element, or because none of apiKey, passphrase, timestamp, and sign is provided.
60026OAUTH_AND_APIKEY_BATCH_NOT_SUPPORTEDThe same op=login request contains both an OAuth token and an API Key. Use only one authentication method per login request.
60031NOT_ALLOW_MULTIPLE_LOGINA connection may log in to only one account. This also applies when a previous login is still processing or multiple accounts are included in the request.
60027PARAMETER_IS_EMPTYA required login parameter is empty. The msg field identifies the missing field.
60005INVALID_ACCESS_KEYInvalid API Key. The format is invalid or the user center has determined that the API Key cannot be used.
60004INVALID_ACCESS_TIMESTAMPtimestamp is not numeric or cannot be parsed. Use a Unix timestamp instead of a date string.
60006TIMESTAMP_EXPIREDThe timestamp differs too much from server time and the signature has expired.
60007INVALID_SIGNSignature verification failed. Common causes include incorrect signing content or order, an incorrect Secret Key, or an incorrect encoding method.
60024API_LOGIN_PASSPHRASE_ERRORThe Passphrase does not match the API Key.
60032APIKEY_NOT_EXISTThe API Key does not exist, has been deleted, or belongs to another environment or site.
60009LOGIN_FAILURELogin failed for another reason not covered by the above errors.
60029NO_ACTIVE_CEDEFI_ADDRESSOnly returned by op=login-wallet. The API Key is valid, but the account has no active CeDeFi address.
60030NO_CEDEFI_ACCOUNTOnly returned by op=login-wallet. The account has no CeDeFi account.
63999INTERNAL_SYSTEM_ERRORInternal server error during login. Retry the request; report the connId and timestamp if the error persists.
51003ARGS_EMPTYargs is missing or empty for op=connect_backends or op=send. The entire request is rejected.
51004BACKEND_MISSINGAn argument for op=connect_backends or op=send is null, or backend is missing or blank.
51005BODY_INVALIDThe body for op=send is missing, empty, or not a JSON string.
51011BACKEND_NOT_CONFIGUREDThe requested backend is not configured for this service.
51013DUPLICATE_CONNECTThe backend channel is already connected or is being connected. Wait for event=backend with code=0.
51012BACKEND_UNAVAILABLEThe request could not be delivered to the backend. The backend may be unreachable, reconnecting, or overloaded. This is retryable.
60018CHANNEL_NOT_EXISTThe subscribed channel is not available in the private gateway or current environment.
0CODE_CONNECTEDNot an error. Indicates that the backend channel is ready and previous subscriptions have been restored.
50011CODE_DISCONNECTNot a final error. The backend channel disconnected while the WebSocket connection remains open. The server will reconnect automatically.
50012CODE_COMPLETEDThe backend channel was closed gracefully. Recovery behavior is the same as CODE_DISCONNECT.
4004ws closeThe server received no data from the connection for 30 consecutive seconds and closed it. Heartbeats are required even when the client only receives data.
4006ABNORMAL_DISCONNECTIONAn unexpected internal error occurred while the server was processing the connection.
61001UNSUPPORTED_CHANNELInvalid or unsupported channel.
61002INVALID_ARGSInvalid arguments.
61003UNKNOWN_OPInvalid or unsupported operation.
61004REQUEST_DATA_DESERIALIZATION_FAILEDFailed to deserialize request.data.
61005INVALID_USER_ADDRESSInvalid user address.
61006INVALID_VAULT_ADDRESSInvalid vault address.