Swap tokens
build_swapSwap any two ERC-20 tokens on Base through 0x for the wallet: an approval of 0x's AllowanceHolder if needed, then the swap exactly as 0x built it. Fees: Panda 0.15% in the sold token (paid inside the swap) + 0x 0.15%. Native ETH is not swapped (wrap it first). Returns unsigned transactions to sign in order (and as one EIP-5792 batch), simulated from the wallet, plus a sign_url for a human owner. Nothing is sent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount to sell, in whole tokens. | |
| wallet | Yes | The wallet on Base that will sign (and that owns the positions). | |
| buy_token | Yes | Token to buy: a symbol (USDC, WETH, AERO, BNKR, cbBTC) or a token address on Base. | |
| sell_token | Yes | Token to sell: a symbol (USDC, WETH, AERO, BNKR, cbBTC) or a token address on Base. | |
| slippage_bps | No | Optional slippage tolerance in basis points (default 50 = 0.5%). |