Build unsigned swap calldata
build_swapQuotes a token swap and returns verified unsigned Router calldata with minimum output and deadline included, so you can review and sign in your own wallet.
Instructions
Quote a swap and return verified UNSIGNED calldata for the Router, with the minimum output and deadline baked in. Nothing is signed or sent: review it, then sign in your own wallet.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | the account that will send the swap; enables the allowance check | |
| chain | No | base | eth | optimism | arbitrum | robinhood, or a numeric chain id. Optional when your RPC has a single chain. | |
| amount | No | input amount in human units, for example "1.5" | |
| tokenIn | Yes | input token: a 0x address, or a symbol such as ETH, WETH, USDC, BZPX | |
| version | No | protocol version: latest (default) | 1 | 2 | 2.0.0 | |
| amountIn | No | input amount in base units, as an integer string | |
| tokenOut | Yes | output token: a 0x address, or a symbol such as ETH, WETH, USDC, BZPX | |
| recipient | Yes | who receives tokenOut | |
| userMinOut | No | optional explicit minimum output, in base units of tokenOut | |
| deadlineSec | No | deadline horizon in seconds, 10-3600, default 120 | |
| slippageBps | No | 0-5000, default 50; never below the on-chain floor |