Error codes
Learn about 0x error codes and how to resolve them.
If the error you are experiencing persists, please contact support to resolve the issue.
Unless the spec defines otherwise, errors to bad requests should respond with HTTP 4xx or status codes.
HTTP Error Codes​
Code | Reason | Details |
---|---|---|
400 | Bad Request – Invalid request format | Check that the API request was formatted properly. |
404 | Not found | Check that the API request was formatted properly. |
429 | Too many requests - Rate limit exceeded | You have exceeded your rate limit. Contact support to resolve the issue. |
500 | Internal Server Error | An unexpected error has occurred. Contact support to resolve the issue. |
501 | Not Implemented | The API does not support the given endpoint you’ve requested. Please check the method (e.g. GET) and the endpoint you are using. |
Error reporting format​
For all 400 responses, see the error response schema.
{
"code": 101,
"reason": "Validation failed",
"validationErrors": [
{
"field": "maker",
"code": 1002,
"reason": "Invalid address"
}
]
}
General Error Codes​
Code | Reason | Details |
---|---|---|
100 | Validation Failed | Check that the API request was formatted properly. |
101 | Malformed JSON | Check that the API request was formatted properly. |
102 | Order submission disabled | Check that the API request was formatted properly. |
103 | Throttled | You have exceeded your rate limit. Contact support to resolve the issue. |
104 | Not Implemented | Check that the API request was formatted properly. |
105 | Transaction Invalid | Check that the API request was formatted properly. |
106 | Unable to Submit on Behalf Of Taker | Check that the takerAddress address is accurate. |
107 | Invalid API Key | The API key you are using appears to be invalid. Check that you are using the correct key from the 0x Dashboard. |
108 | Service Disabled | Check that you are using the correct API request. If the problem persists, please contact support to resolve the issue. |
109 | Insufficient funds for transaction | Please make sure you have enough ETH balance for sending, including enough to cover gas fees. |
110 | ETH selling is not supported | 0x APIs only support ERC-20s. ETH is not an ERC-20. Consider wrapping ETH to WETH in order to proceed. |
111 | Gas estimation failed | A takerAddress  must be provided for accurate gas estimating. Does the taker have sufficient allowance and balance? If not, the gas estimate will fail. |
Swap API Validation Error Codes​
Code | Reason | Details |
---|---|---|
1000 | Required field | Ensure all required fields are present, specifically check the following: - buyToken and sellToken are different- takerAddress is valid when RFQ is explicitly requested |
1001 | Incorrect format | Both includesSources and excludedSources are present. |
1002 | Invalid address | buyToken and sellToken need to be contract addresses. For a native token (on any chains we support), you can use contract address 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee |
1003 | Address not supported | Check that the takerAddress , sellToken , and buyToken addresses are accurate. |
1004 | Value out of range | We are not able to fulfill the order. Some common reasons may include: - cannot find token symbols for sellToken or buyToken . The recommendation is to use token addresses instead of symbols, in all cases.- no liquidity is available for the token pair requested. This is common for long-tail tokens - we are not able to find liquidity for the request asset - parameters used are not accepted values (e.g. slippagePercentage , priceImpactProtectionPercentage , and buyTokenPercentageFee should be between 0 and 1)- excludedSources should not include all sources- the price impact returned by is greater than the percentage asked |
1005 | Invalid signature or hash | Check that the API request was formatted properly. |
1006 | Unsupported option | A parameter in the request is not supported. For example, sellTokenPercentageFee is not supported but buyTokenPercentageFee is supported |
1007 | Invalid 0x order | Check that the API request was formatted properly. |
1008 | Internal error | Check that the API request was formatted properly. |
1009 | Token is not supported | The token you are swapping is not supported. You can add it as a feature request here. |
1010 | Field is invalid | A field provided in the request is invalid. Some recommended fields to check include: - neither buyToken nor sellToken are null- the chain url is correct - sellAmount is big enough to cover fees |
WalletExecuteDelegateCallFailedError | Swap API doesn’t support fee-on-transfer tokens. | Check that neither the buy or sell tokens are fee-on-transfer tokens |