Example Request
Parameters
- chainIdFrom: The source blockchain chain ID (e.g., 56 for BSC, 1 for Ethereum)
- chainIdTo: The destination blockchain chain ID (e.g., 42161 for Arbitrum)
- fromToken: Source token contract address (use
0x0000000000000000000000000000000000000000
for native tokens) - toToken: Destination token contract address (use
0x0000000000000000000000000000000000000000
for native tokens) - fromWalletAddress: Source wallet address
- toWalletAddress: Destination wallet address
- amountIn: Amount to swap in wei (smallest unit)
Response
The API returns detailed swap information including:- Route information: Source and destination transaction details
- Quote details: Amount calculations and costs
- Transaction data: Ready-to-execute transaction data
- Gas costs: Estimated gas fees for the swap
Common Chain IDs
Network | Chain ID |
---|---|
Ethereum | 1 |
BSC | 56 |
Polygon | 137 |
Arbitrum | 42161 |
Optimism | 10 |
Avalanche | 43114 |
Native Token Address
For native tokens (ETH, BNB, MATIC, etc.), use the zero address:0x0000000000000000000000000000000000000000
Body
application/json
Quote request parameters
Source blockchain chain ID
Destination blockchain chain ID
Source token contract address (use 0x0000000000000000000000000000000000000000 for native tokens)
Destination token contract address (use 0x0000000000000000000000000000000000000000 for native tokens)
Source wallet address
Destination wallet address
Amount to swap in wei (smallest unit)
Response
Successful quote response