Common Response Format
Spot Open API Response Format
Success Response (code = 0):
{
"code": 0,
"msg": "success",
"data": { ... }
}
Futures Open API Response Format
Success Response (code = 0):
{
"code": 0,
"msg": "success",
"data": { ... }
}
Error Response (Common)
{
"code": 400,
"message": "Error description"
}
Futures HTTP Error Codes
HTTP status equals body code.
| Error Code | Description |
|---|---|
| 400 | Invalid parameters / failed to read request body |
| 401 | Missing auth parameters / timestamp expired / signature verification failed / invalid API Key |
| 403 | IP not in whitelist / API Key has no trading permission |
| 429 | Rate limit exceeded (per second/per minute) / order rate limit exceeded |
| 500 | Internal error |
Futures Business Error Codes (HTTP 200)
Business errors are returned with HTTP 200. Use the code field in the body to identify the specific error.
| Error Code | Description |
|---|---|
| 0 | Success |
| 1001 | System error |
| 3000 | Trading pair not found / object not found |
| 3004 | Third-party service error (K-line / Ticker query failed, etc.) |
| 8001 | Below minimum trade amount |
| 8002 | Close position order failed, please check your position |
| 8003 | Insufficient balance to close, please check position and open orders |
| 8004 | Order creation failed |
| 8005 | Take-profit/stop-loss order creation failed |
| 8006 | Take-profit/stop-loss order would be triggered immediately |
| 8007 | Insufficient initial margin to adjust leverage |
| 8008 | Failed to adjust leverage |
| 8009 | Failed to switch margin mode |
| 8010 | Cannot change margin mode while holding a position |
| 8011 | Leverage error |
| 8012 | Margin mode error |
| 8013 | Failed to add margin |
| 8014 | Cannot reduce leverage while holding an isolated position |
| 8015 | Insufficient reducible margin |
| 8016 | Exceeds maximum trade amount |
| 8017 | Exceeds maximum position size |
| 8018 | Insufficient margin |
| 8100 | Product information error |
Spot HTTP Error Codes
Spot API has no business error codes. All errors are returned with the corresponding HTTP status code; the specific reason is in the msg field.
| Error Code | Description |
|---|---|
| 400 | Invalid parameters / trading pair not found / order/cancel failed (e.g. insufficient balance; see msg for details) |
| 401 | Missing auth parameters / timestamp expired / signature verification failed / invalid API Key |
| 403 | IP not in whitelist / no trading permission |
| 404 | Order not found |
| 429 | Rate limit exceeded / order rate limit exceeded |
| 500 | Internal error / K-line service unavailable |