Prepare a swap
prepare_swapBuild a swap for the user to sign. Does not broadcast. Requires the "swap" permission. Native coin, cross-chain (buyChainId) and gasless (typed-data payloads instead of calldata) are all supported. Give the user reviewUrl: it opens the app with this exact trade filled in, ready to sign. If hands-free trading is on, use execute_swap instead. On Solana it is quoted for the user’s own Solana wallet and signed in the app.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chainId | Yes | ||
| gasless | No | ||
| buyToken | Yes | ||
| sellToken | Yes | ||
| buyChainId | No | ||
| sellAmount | Yes | ||
| slippageBps | No |