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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"mint": "<mint>",
"side": "<side>",
"amount": "<amount>",
"walletPublicKey": "<walletPublicKey>"
},
"name": "prepare_trade"
}
}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, up to 500 (5%). Default 100 (1%). A sandwich bot can take up to the whole tolerance, so keep it tight | |
| walletPublicKey | Yes | Public address of the wallet that will sign and pay (base58) | |
| priorityFeeMicroLamports | No | Priority fee per compute unit, in micro-lamports. Default 10000. Raise it if trades aren't landing when Solana is busy; the maximum adds at most 0.00025 SOL |