DEX swap quote and price impact for up to 5 trade sizes on Base, Ethereum, Arbitrum (quote only)
swap_quoteUse when an agent needs a swap quote and price impact before trading. Input: chain (base, ethereum, arbitrum), from, to (ticker like USDC, ETH or 0x address), amounts (1-5 sizes in from-token units). Output: JSON per size best venue (Uniswap v3 fee tier, Uniswap v2, Aerodrome), amount out, effective price, price impact %, all venue quotes, spot price. Quote only: no calldata, nothing executed. Example: ?from=USDC&to=ETH&amounts=1000,100000 Price: $0.002 USDC (Base or Solana) via x402.
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": "<from>",
"to": "<to>",
"amounts": "<amounts>"
},
"name": "swap_quote"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | Token bought (same format) | |
| from | Yes | Token sold: ticker (USDC, USDT, ETH/WETH, BTC/cbBTC/WBTC, wstETH, DAI, AERO, ARB… per chain) or 0x address. Unknown → 400 before payment | |
| chain | No | Chain (default base) | |
| amounts | Yes | 1-5 trade sizes in units of the from token, comma-separated (alias amount) |