Error Code Examples
All APIs may return exceptions.
The following are possible error codes returned by the API
| Error Code | Description |
|---|---|
| 0 | Operation executed successfully |
| 9999 | Common exception |
| 500 | Internal error |
| 501 | System busy |
| 401 | Unauthorized |
| 402 | API key expired |
| 406 | Access IP not in allowlist |
| 506 | Unknown request source |
| 510 | Too many requests |
| 511 | API access forbidden |
| 513 | Invalid request (for Open API requests where the request time is more than 2 seconds ahead of server time or more than 10 seconds behind server time) |
| 600 | Parameter error |
| 601 | Data parsing error |
| 602 | Signature verification failed |
| 603 | Duplicate request |
| 701 | Account read permission is required |
| 702 | Account write permission is required |
| 703 | Trade read permission is required |
| 704 | Trade write permission is required |
| 1000 | Account does not exist |
| 1001 | Futures contract does not exist |
| 1002 | Futures contract is not enabled |
| 1003 | Risk limit level error |
| 1004 | Amount error |
| 2001 | Order direction error |
| 2002 | Position opening type error |
| 2003 | Buy order price is too high |
| 2004 | Sell order price is too low |
| 2005 | Insufficient balance |
| 2006 | Leverage error |
| 2007 | Order price error |
| 2008 | Insufficient closable quantity |
| 2009 | Position does not exist or is already closed |
| 2011 | Order quantity error |
| 2013 | Canceled orders exceed maximum limit |
| 2014 | Batch orders being placed exceed the limit |
| 2015 | Price or quantity accuracy error |
| 2016 | Conditional orders exceed the maximum order limit |
| 2018 | Exceeds maximum reducible margin |
| 2019 | Active open order exists |
| 2021 | Leverage of order being placed does not match existing position leverage |
| 2022 | Position type error |
| 2023 | Position that exceeds the max leverage of the new tier exists |
| 2024 | Order that exceeds the max leverage of the new tier exists |
| 2025 | Current position size exceeds the maximum allowed quantity of the new tier |
| 2026 | Leverage adjustment is not supported in cross margin mode |
| 2027 | Only one position is allowed per direction (cross or isolated) |
| 2028 | Exceeds maximum order-placing quantity |
| 2029 | Order type error |
| 2030 | External order ID is too long (max 32 characters) |
| 2031 | Exceeds the maximum position quantity allowed under the current risk limit |
| 2032 | The order price is less than the long position liquidation price |
| 2033 | The order price is greater than the short position liquidation price |
| 2034 | Batch query count exceeds limit |
| 2035 | Market price tier not supported |
| 3001 | Conditional order price type error |
| 3002 | Conditional order trigger type error |
| 3003 | Execution cycle error |
| 3004 | Trigger price error |
| 4001 | Unsupported cryptocurrency |
| 2036 | Order-placing count exceeds limit. Please contact our customer service. |
| 2037 | Too-frequent trading. Please try again later. |
| 2038 | Maximum allowed position quantity exceeded. Please contact our customer service. |
| 5001 | Take-profit and stop-loss prices cannot be empty at the same time. |
| 5002 | Take-profit/stop-loss order does not exist or is closed |
| 5003 | Take-profit/stop-loss price setting error |
| 5004 | Total pending quantity of take-profit and stop-loss orders exceed closable position quantity |
| 6001 | Trading is prohibited |
| 6002 | Position opening is prohibited |
| 6003 | Time range error |
| 6004 | Trading pair and status required |
| 6005 | Trading pair is not available for trading |