Error Code
This document provides a comprehensive list of error codes that may be returned by the DEX API. Understanding these error codes will help you handle errors effectively in your applications.
HTTP Status Codes
The API uses standard HTTP status codes to indicate the success or failure of a request:
HTTP Code | Error Type |
---|---|
2xx | Success |
4xx | Client Error |
5xx | Server Error |
Error Response Format
When an error occurs, the API will return a JSON response in the following format:
{
"code": "ERROR_CODE",
"message": "A human-readable error message"
}
Error Code
10xxx - General Errors
These are common error codes that apply to any API request. They typically indicate issues like invalid input, missing parameters, or internal server errors.
HTTP Code | Error Code | Error Description |
---|---|---|
500 | 10000 | Internal server error |
502 | 10001 | Bad Gateway |
503 | 10002 | Unable to connect to server |
504 | 10003 | Request timestamp is far from the server time |
504 | 10004 | Timeout |
401 | 10005 | Unauthorized api key |
401 | 10006 | Invalid 'VESSEL-PASSPHRASE' |
401 | 10007 | Failed to verify signature |
404 | 10008 | API not found |
405 | 10009 | Request method is not allowed |
429 | 10010 | IP address rate limit exceeded |
429 | 10011 | User rate limit exceeded |
500 | 10012 | System under maintenance. All APIs currently unavailable. |
11xxx - API Request Errors
These errors are related to specific issues with the API request itself, such as unauthorized access, rate limits, or endpoint not found.
HTTP Code | Error Code | Error Description |
---|---|---|
400 | 11001 | Missing required header '{headerName}' |
400 | 11002 | Missing required parameter '{paramName}' |
400 | 11003 | Header '{headerName}' was empty |
400 | 11004 | Parameter '{paramName}' was empty |
400 | 11005 | Invalid '{paramName}'. Value must be of type ({type}) |
400 | 11006 | Invalid '{paramName}'. Value not in allowed enum values [{allowedValues}] |
400 | 11007 | Invalid '{paramName}'. Value exceeds maximum allowed ({maxValue}) |
400 | 11008 | Invalid '{paramName}'. Value does not reach minimum required ({minValue}) |
400 | 11009 | Invalid '{paramName}'. Value must start with '{expectedPrefix}' |
400 | 11010 | Invalid '{paramName}'. '{paramName}' must be an integral multiple of ({1e(-maxDecimal)}) |
400 | 11011 | Unknown parameter '{paramName}' |
400 | 11012 | Invalid request body |
400 | 11013 | Invalid 'symbol' |
400 | 11014 | Invalid 'assetName' |
400 | 11015 | Invalid 'assetId' |
400 | 11016 | Invalid 'level' |
400 | 11017 | Invalid 'poolId' |
400 | 11018 | Invalid 'VESSEL-TIMESTAMP' |
400 | 11021 | Upload limit exceeded. Maximum of ({maxNumber}) files allowed |
400 | 11022 | File '{fileName}' exceeds maximum size limit ({sizeLimit}) |
400 | 11023 | User not found. Please register first |
400 | 11024 | Twitter account already verified for this user |
400 | 11025 | Not eligible to generate invitation code |
12xxx - Spot Trading Errors
This category covers errors specific to spot trading operations. Examples include invalid order types, insufficient balance, or market data issues.
HTTP Code | Error Code | Error Description |
---|---|---|
400 | 12001 | Insufficient balance |
400 | 12002 | Duplicate clientOrderId |
400 | 12003 | Invalid 'clientOrderId'. 'clientOrderId' must be unit252. |
400 | 12004 | Order not found |
400 | 12005 | Order already closed |
400 | 12006 | Order already cancelled |
400 | 12007 | Order already filled |
400 | 12008 | Cancel order failed. Can only cancel order with 'NEW' or 'PARTIALLY_FILLED' status |
400 | 12009 | Modify order failed. Can only modify order with 'NEW' status |
400 | 12010 | Place order failed. Reach the max open orders allowed ({maxOrderQty}) |
400 | 12011 | Spot market is closed for the symbol |
400 | 12012 | Invalid Poseidon hash or signature |
400 | 12013 | Cancel all orders partially failed. Some orders could not be cancelled |
13xxx - AMM (Automated Market Maker) Errors
These errors occur in the context of Automated Market Maker functions. Issues such as liquidity provision failures or incorrect AMM pool parameters are categorized here.
HTTP Code | Error Code | Error Description |
---|---|---|
400 | 13001 | Insufficient balance |
400 | 13002 | Invalid Poseidon hash or signature |
400 | 13003 | Add liquidity failed. Amount of liquidity added less than minimum requirement |
400 | 13004 | Invalid 'nonce'. 'nonce' must be uint252 |
400 | 13005 | Invalid tick range. 'tickIndexL' must be less than 'tickIndexR' |
400 | 13006 | Invalid 'tickIndexL'. Value cannot be less than pool minimum tick ({minTick}) |
400 | 13007 | Invalid 'tickIndexR'. Value cannot be more than pool maximum tick ({maxTick}) |
400 | 13008 | Add liquidity failed. Reached the max open positions allowed in this pool ({maxPositionSize}) |
400 | 13009 | Remove liquidity failed. Removing zero liquidity is not allowed |
400 | 13010 | Remove liquidity failed. Amount of liquidity removed less than minimum requirement. |
400 | 13011 | AMM position not found |
400 | 13012 | Duplicate nonce |
400 | 13013 | Collect fee failed. Empty fee in this position |
400 | 13014 | Must provide 'tickR' and 'tickL' at the same time |
14xxx - Deposits & Withdrawals Errors
Transfer errors are associated with the movement of assets between wallets or accounts, such as failed transfers or invalid recipient addresses.
HTTP Code | Error Code | Error Description |
---|---|---|
400 | 14001 | Insufficient balance |
400 | 14002 | Withdraw history not found |
400 | 14003 | ClientOrderId duplicated |
400 | 14004 | Duplicate nonce |
400 | 14005 | Invalid 'nonce'. 'nonce' must be uint252 |
400 | 14006 | To Address must be registered on Vessel |
400 | 14007 | Failed to verify Ethereum signature |
20xxx - WebSocket Errors
These errors occur when interacting with WebSocket streams. Examples include issues with connection, authentication, or data transmission through WebSocket channels.
Error Code | Error Description |
---|---|
20000 | Connection failed due to internal error |
20001 | Request timestamp is far from the server time |
20002 | Unauthorized api key |
20003 | Invalid 'VESSEL-PASSPHRASE' |
20004 | Failed to verify signature |
20005 | Missing required parameter '{paramName}' |
20006 | Parameter '{paramName}' was empty |
20007 | Invalid request body |
20008 | Unknown parameter '{paramName}' |
20009 | Invalid 'type' |
20010 | Invalid 'channel' |
20011 | Invalid 'Interval'. Value not in allowed enum values [1m, 3m, 5m, 15m, 30m, 1h, 4h, 8h, 12h,1d] |
20012 | User channel requires authentication first |
20013 | Multiple authentications not allowed on a single WebSocket connection. |
20014 | Invalid 'symbol' |
20999 | Automatically disconnected. A single connection to the WebSocket API is valid for 24 hours. Reconnection is required for continuous communication. |