swap_quote
[$0.01 USDC per call via x402] Best same-chain swap quote (DEX aggregation) for any token pair on Base, Ethereum, Arbitrum, Optimism, Polygon, BSC, Avalanche, Solana and more: output amount, minimum received, fees, gas, via Relay (LI.FI fallback).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"from_token": "<from_token>",
"to_token": "<to_token>",
"amount": "<amount>"
},
"name": "swap_quote"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount to sell in human units | |
| slippage | No | Max slippage fraction (default 0.005) | |
| to_token | Yes | Token symbol or address to buy | |
| from_chain | No | Chain name or id (default base) | |
| from_token | Yes | Token symbol or address to sell | |
| from_address | No | Optional wallet; required for an executable transaction request |