Skip to main content
Version: 2.0

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​

CodeReasonDetails
400Bad Request – Invalid request formatCheck that the API request was formatted properly.
404Not foundCheck that the API request was formatted properly.
429Too many requests - Rate limit exceededYou have exceeded your rate limit. Contact support to resolve the issue.
500Internal Server ErrorAn unexpected error has occurred. Contact support to resolve the issue.
501Not ImplementedThe 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​

CodeReasonDetails
100Validation FailedCheck that the API request was formatted properly.
101Malformed JSONCheck that the API request was formatted properly.
102Order submission disabledCheck that the API request was formatted properly.
103ThrottledYou have exceeded your rate limit. Contact support to resolve the issue.
104Not ImplementedCheck that the API request was formatted properly.
105Transaction InvalidCheck that the API request was formatted properly.
106Unable to Submit on Behalf Of TakerCheck that the takerAddress address is accurate.
107Invalid API KeyThe API key you are using appears to be invalid. Check that you are using the correct key from the 0x Dashboard.
108Service DisabledCheck that you are using the correct API request. If the problem persists, please contact support to resolve the issue.
109Insufficient funds for transactionPlease make sure you have enough ETH balance for sending, including enough to cover gas fees.
110ETH selling is not supported0x APIs only support ERC-20s. ETH is not an ERC-20. Consider wrapping ETH to WETH in order to proceed.
111Gas estimation failedA 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​

CodeReasonDetails
1000Required fieldEnsure all required fields are present, specifically check the following:
- buyToken and sellToken are different
- takerAddress is valid when RFQ is explicitly requested
1001Incorrect formatBoth includesSources and excludedSources are present.
1002Invalid addressbuyToken and sellToken need to be contract addresses. For a native token (on any chains we support), you can use contract address 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
1003Address not supportedCheck that the takerAddress , sellToken , and buyToken addresses are accurate.
1004Value out of rangeWe 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
1005Invalid signature or hashCheck that the API request was formatted properly.
1006Unsupported optionA parameter in the request is not supported. For example, sellTokenPercentageFee is not supported but buyTokenPercentageFee is supported
1007Invalid 0x orderCheck that the API request was formatted properly.
1008Internal errorCheck that the API request was formatted properly.
1009Token is not supportedThe token you are swapping is not supported. You can add it as a feature request here.
1010Field is invalidA 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
WalletExecuteDelegateCallFailedErrorSwap API doesn’t support fee-on-transfer tokens.Check that neither the buy or sell tokens are fee-on-transfer tokens