Error Codes
This page lists all error codes that may be returned by the BigONE OpenAPI.
Error Response Format
All errors follow this format:
{
"code": 40004,
"message": "Unauthorized"
}
The code field contains the error code, and message provides a human-readable description.
Authentication Errors
These errors occur during the authentication process.
| Code | HTTP | Message | Description |
|---|---|---|---|
| 40004 | 401 | Unauthorized | Missing or invalid authentication credentials |
| 40106 | 401 | Invalid token | JWT token is malformed, has an invalid signature, or has expired |
| 40107 | 400 | Unexpected request header | Authorization header format is incorrect |
| 10403 | 403 | Permission denied | API key lacks required scopes or IP not in whitelist |
| 10429 | 429 | Too many requests | Rate limit exceeded |
General Errors
Common errors that can occur across all endpoints.
| Code | HTTP | Message | Description |
|---|---|---|---|
| 10005 | 500 | Internal error | Server encountered an unexpected error |
| 10007 | 400 | Parameter error | Request parameters are invalid or missing |
| 10013 | 404 | Resource not found | The requested resource does not exist |
| 10014 | 400 | Insufficient funds | Account balance is insufficient for the operation |
Order Errors
Errors specific to order creation and management.
| Code | HTTP | Message | Description |
|---|---|---|---|
| 40303 | 403 | Forbid cancel market order | Market orders cannot be cancelled after submission |
| 40304 | 403 | Creating order is forbidden | Order creation is temporarily disabled |
| 40305 | 403 | Account restricted | Your account has trading restrictions |
| 50047 | 400 | Liquidity taken too much | Order would consume too much liquidity |
| 54041 | 400 | Duplicate order | An order with the same client_order_id already exists |
| 54043 | 400 | Unknown opening order | The order to cancel was not found |
| 60100 | 403 | Asset pair is suspended | Trading is suspended for this asset pair |
Convert Errors
Errors specific to the Convert (flash swap) API.
| Code | HTTP | Message | Description |
|---|---|---|---|
| 54046 | 400 | Convert asset not supported | The specified asset cannot be converted |
| 54047 | 400 | Convert price expired | The quote has expired, please request a new one |
| 54048 | 400 | Convert parameter inconsistent | Request parameters don't match the original quote |
| 54050 | 400 | Convert amount too small | The amount is below the minimum conversion limit |
| 54053 | 403 | Convert system busy | System is temporarily overloaded, please retry later |
Handling Errors
Best Practices
- Always check the
codefield — Don't rely solely on HTTP status codes - Log error details — Include error code and message for debugging
- Implement retry logic — For transient errors (10005, 54053), retry with exponential backoff
- Handle rate limits — For 10429, wait before retrying (recommended: 10 seconds)
Example Error Handling (Python)
import requests
import time
def make_api_request(url, headers):
response = requests.get(url, headers=headers)
data = response.json()
if data.get("code") != 0:
error_code = data.get("code")
error_message = data.get("message")
if error_code == 10429:
# Rate limited - wait and retry
time.sleep(10)
return make_api_request(url, headers)
elif error_code == 40004:
# Authentication error - refresh token
raise AuthenticationError("Token expired")
elif error_code == 10014:
# Insufficient funds
raise InsufficientFundsError(error_message)
elif error_code in [10005, 54053]:
# Transient error - retry with backoff
time.sleep(1)
return make_api_request(url, headers)
else:
raise APIError(f"Error {error_code}: {error_message}")
return data
Example Error Handling (Go)
type APIError struct {
Code int `json:"code"`
Message string `json:"message"`
}
func handleAPIError(resp *http.Response) error {
var apiErr APIError
if err := json.NewDecoder(resp.Body).Decode(&apiErr); err != nil {
return err
}
switch apiErr.Code {
case 10429:
// Rate limited
time.Sleep(10 * time.Second)
return ErrRateLimited
case 40004, 40106:
// Authentication error
return ErrUnauthorized
case 10014:
// Insufficient funds
return ErrInsufficientFunds
default:
return fmt.Errorf("API error %d: %s", apiErr.Code, apiErr.Message)
}
}
Getting Help
If you encounter an error not listed here:
- Check the specific API endpoint documentation for additional error codes
- Join @bigapi on Telegram for real-time community support
- Contact BigONE Customer Service with:
- Error code and message
- Request endpoint and parameters
- Timestamp of the error (UTC)