As of August 2023, all free public API usage has been reduced to 1 requests per second (rps).
For workloads that require higher RPS, expanded quotas, or sustained performance, explore the available paid plans on the pricing page. For organizations with significant trading volumes or advanced requirements, complete this application to explore tailored Enterprise options.
This error can occur for a number of reasons:
This error occurs when the eth_estimateGas RPC call throws an error. There are many reasons why this can throw an error, and they all tend to mean the transaction is guaranteed to fail. This is a protection, so a transaction is broadcast that's going to fail. To find the precise error, disableEstimate=true can be used in the query and an eth_estimateGas RPC call can be done locally. The transaction can also be simulated with a platform like tenderly or blocknative for a better look at the transaction trace.
Some common reasons why a transaction may fail:
In the case of one of these errors, you may not have a token approval or you're missing the token balance. To do a token approval, you can use the API to approve the token to the 1inch router.
The parts parameters is comprised of 3 things
Each of these has their own unique meaning. The main route parts denotes the initial split and can be seen on the UI. In this example it's the 70%/30% split
The parts parameter is how many individual blocks there can be. In the picture above we can see 4 blocks with the top being the first main route part with 2 parts to it and the bottom one being the second main route part with 2 parts in it.
The virtual parts is the splits inside of a part. We can see in the first main route part above, in the first block there are 2 virtual parts splitting the USDC between hashflow and uniswap. In the second main route part we can see three virtual parts in the first block, a hashflow route with 2 different rates and one to uniswap.
Complexity level is how many steps a swap can go through, below are the levels and what it means for the swap. Each level adds to the previous level.
To limit the liquidity sources to a query, you can manually enter the pool-contacts that you to use using the "protocols" parameter. All other liquidity sources will be excluded by default.
Feel free to reach out to us in the live support chat!
Debugging with X-Request-Id
Every API response includes an X-Request-Id header that uniquely identifies your request. When contacting support, include this value for faster investigation. If you use the 1inch MCP Server, the debug tool can look up production logs by this request id.