Swap
swapQuote and prepare token exchanges, build required approvals plus calls, and submit for WalletChan popup approval unless previewOnly is true.
Instructions
Quote a WalletChan swap, build needed approval plus swap calls, and submit them to WalletChan for popup approval unless previewOnly is true.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| from | No | Optional approved WalletChan sender. Defaults to first approved account. | |
| chain | No | Chain name or ID. Defaults to the active WalletChan RPC chain. | |
| taker | No | Alias for from. | |
| submit | No | Set false to return quote and prepared calls without submitting to WalletChan. | |
| buyToken | Yes | Buy token address, symbol from the WalletChan token list, or native/ETH. | |
| decimals | No | Optional token decimals when sellToken is an address not in the token list. | |
| profileId | No | Alias for executionProfile. | |
| recipient | No | Optional recipient for bought tokens. | |
| sellToken | Yes | Sell token address, symbol from the WalletChan token list, or native/ETH. | |
| sellAmount | No | Decimal sell amount in token units, e.g. 1.5. Use sellAmountWei for base units. | |
| previewOnly | No | If true, return quote and prepared calls without submitting to WalletChan. | |
| slippageBps | No | Slippage in basis points. Defaults to 500 (5%). | |
| allowWarnings | No | If true, allow submission despite balance/liquidity warnings. Defaults to false. | |
| sellAmountWei | No | Optional base-unit sell amount as an integer string. | |
| tokenDecimals | No | Alias for decimals. | |
| atomicRequired | No | Whether the WalletChan call batch must execute atomically. Defaults to true with automatic non-atomic fallback. | |
| executionProfile | No | Execution profile override. Use walletconnect for main WalletChan popup approval, agent:<walletId> for delegated 1Shot execution, or agent-eoa:<walletId> for raw local agent EOA execution. Defaults to the stored profile. |