Prepare trade
prepare_tradeBuild an UNSIGNED buy or sell transaction (base64, legacy format) for the given wallet. This does not execute the trade or move funds. To execute it, sign with that wallet and broadcast to Solana before lastValidBlockHeight. Never send a private key to this tool or any other.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mint | Yes | Token mint address (base58) | |
| side | Yes | Trade direction | |
| amount | Yes | Positive integer as a string. buy: SOL in lamports (1 SOL = 1000000000). sell: raw token units (6 decimals, 1 token = 1000000) | |
| slippageBps | No | Slippage tolerance in basis points. Default 300 (3%) | |
| walletPublicKey | Yes | Public address of the wallet that will sign and pay (base58) |