Swap quote, best DEX route
swap_quoteBest price to swap one token for another on 30+ chains (Base, Ethereum, Arbitrum, Solana, BSC…) across DEX aggregators, via LI.FI: amount out, minimum after slippage, USD values, gas and fees, total cost in percent, route and approval address; with fromAddress, the unsigned transaction for your wallet to sign. Tokens by symbol or address, amounts in token units. A quote only: nothing is signed or sent. Use before a trading agent swaps. Example: fromChain=base, fromToken=USDC, amount=1000, toToken=ETH. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount of fromToken in token units, e.g. 100 or 0.5 | |
| toToken | Yes | Token to buy: symbol or address | |
| slippage | No | Slippage tolerance in percent (default 0.5) | |
| fromChain | Yes | Chain name or id: base, ethereum, arbitrum, solana… | |
| fromToken | Yes | Token to sell: symbol (USDC, ETH) or address | |
| toAddress | No | Optional receiving wallet, e.g. a Solana address when bridging to Solana | |
| fromAddress | No | Optional wallet that would send: adds the unsigned transaction to the answer |