Learn how to handle errors in DEXCHANGE-API
DEXCHANGE-API uses conventional HTTP response codes to indicate the success or failure of API requests. In general:
2xx
range indicate success4xx
range indicate an error that failed given the information provided (e.g., a required parameter was omitted)5xx
range indicate an error with our serversAll error responses follow this format:
Code | Description |
---|---|
200 | Success - The request was successful |
400 | Bad Request - The request was invalid |
401 | Unauthorized - Invalid API key |
403 | Forbidden - You don’t have permission |
404 | Not Found - The requested resource doesn’t exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Server Error - Something went wrong on our end |
Code | Description |
---|---|
INVALID_API_KEY | The provided API key is invalid |
EXPIRED_API_KEY | The API key has expired |
MISSING_API_KEY | No API key was provided |
Code | Description |
---|---|
INSUFFICIENT_FUNDS | The user doesn’t have enough balance |
INVALID_AMOUNT | The transaction amount is invalid |
TRANSACTION_FAILED | The transaction could not be processed |
DUPLICATE_TRANSACTION | A transaction with this reference already exists |
Code | Description |
---|---|
INVALID_PHONE | The phone number format is invalid |
INVALID_CURRENCY | The currency is not supported |
MISSING_REQUIRED_FIELD | A required field is missing |
Code | Description |
---|---|
SERVICE_UNAVAILABLE | The requested service is currently unavailable |
OPERATOR_ERROR | The mobile operator returned an error |
TIMEOUT_ERROR | The request timed out |
Always check the response status
Implement proper error handling
Retry mechanism
Rate limiting
If you encounter any errors that you can’t resolve, please contact our support team:
Learn how to handle errors in DEXCHANGE-API
DEXCHANGE-API uses conventional HTTP response codes to indicate the success or failure of API requests. In general:
2xx
range indicate success4xx
range indicate an error that failed given the information provided (e.g., a required parameter was omitted)5xx
range indicate an error with our serversAll error responses follow this format:
Code | Description |
---|---|
200 | Success - The request was successful |
400 | Bad Request - The request was invalid |
401 | Unauthorized - Invalid API key |
403 | Forbidden - You don’t have permission |
404 | Not Found - The requested resource doesn’t exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Server Error - Something went wrong on our end |
Code | Description |
---|---|
INVALID_API_KEY | The provided API key is invalid |
EXPIRED_API_KEY | The API key has expired |
MISSING_API_KEY | No API key was provided |
Code | Description |
---|---|
INSUFFICIENT_FUNDS | The user doesn’t have enough balance |
INVALID_AMOUNT | The transaction amount is invalid |
TRANSACTION_FAILED | The transaction could not be processed |
DUPLICATE_TRANSACTION | A transaction with this reference already exists |
Code | Description |
---|---|
INVALID_PHONE | The phone number format is invalid |
INVALID_CURRENCY | The currency is not supported |
MISSING_REQUIRED_FIELD | A required field is missing |
Code | Description |
---|---|
SERVICE_UNAVAILABLE | The requested service is currently unavailable |
OPERATOR_ERROR | The mobile operator returned an error |
TIMEOUT_ERROR | The request timed out |
Always check the response status
Implement proper error handling
Retry mechanism
Rate limiting
If you encounter any errors that you can’t resolve, please contact our support team: