Business
Products
Pricing
Enterprise
AI
Docs
Try for free
Sign in
Go to...
Search
⌘K
Classic Swap
API version:
6.1
Introduction
Quick start
Methods
Find the best quote to swap with 1inch Router
GET
Generate calldata to swap on 1inch Router
GET
Address of the 1inch Router that is trusted to spend funds for the swap
GET
Generate approve calldata to allow 1inch Router to perform a swap
GET
Get the number of tokens that the 1inch Router is allowed to swap
GET
List of liquidity sources that are available for routing in the 1inch Aggregation Protocol
GET
List of tokens that are available for swap in the 1inch Aggregation protocol
GET
Migration
Migration from v5.0 to v5.2
Migration from v5.2 to v6.0
Migration from v6.0 to v6.1
Search
⌘K
Classic Swap
API version:
6.1
Introduction
Quick start
Methods
Find the best quote to swap with 1inch Router
GET
Generate calldata to swap on 1inch Router
GET
Address of the 1inch Router that is trusted to spend funds for the swap
GET
Generate approve calldata to allow 1inch Router to perform a swap
GET
Get the number of tokens that the 1inch Router is allowed to swap
GET
List of liquidity sources that are available for routing in the 1inch Aggregation Protocol
GET
List of tokens that are available for swap in the 1inch Aggregation protocol
GET
Migration
Migration from v5.0 to v5.2
Migration from v5.2 to v6.0
Migration from v6.0 to v6.1
Docs
·
APIs
·
Swap API
·
Classic Swap
·
Methods
·
6.1
·
Generate approve calldata to allow 1inch Router to perform a swap
Generate approve calldata to allow 1inch Router to perform a swap
Use with AI
GET
https://api.1inch.com/swap/v6.1/{chain}/approve/transaction
Supported on:
Arbitrum
Avalanche
Base
BNB Chain
ZKsync
Ethereum
Gnosis
Optimism
Polygon
Linea
Sonic
Unichain
Parameters
chain
*
number
path
tokenAddress
*
string
query
Token address you want to swap
amount
string
query
The number of tokens that the 1inch Router is allowed to swap.If not specified, it will be allowed to spend an infinite amount of tokens.
Request Body
This request doesn’t have any request body.
JavaScript
Copy
Try it
1
Returns
200
ApproveCallDataResponse
object
data
*
string
The encoded data to call the approve method on the swapped token contract
gasPrice
*
string
Network high gas price in wei
to
*
string
Token address that will be allowed to exchange through 1inch Router
value
*
string
Native token value in wei (for approve is always 0)
JSON
Copy
1
Address of the 1inch Router that is trusted to spend funds for the swap
Get the number of tokens that the 1inch Router is allowed to swap
Did you find what you need?
Yes
No