swap build
swap_buildGet a ready-to-sign swap transaction at the best DEX route: to, data, value and gas for your wallet, the minimum output after slippage, and the exact-amount approve() to send first for tokens. Unsigned: you sign and send it yourself; we never hold funds. Costs $0.005 USDC per call (x402).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | base (default), ethereum, arbitrum, optimism, polygon | |
| amount | Yes | ||
| sender | Yes | Wallet that will sign | |
| to_token | Yes | ||
| recipient | No | ||
| from_token | Yes | ||
| slippage_percent | No | Default 0.5 |