Prepare an unsigned order
prepare_orderPrepare an unsigned server-run order for the user's own wallet: limit, take_profit, stop_loss, trailing_stop, tp_sl (one cancels the other) or dca. Uses a live quote. Returns humanSummary (read it to the user), the typed data the user's wallet signs, any approvals, the request bodies to send after signing, expiresAt (prepare again after it), and reviewUrl: a link that opens the order on HelmSwap's own review screen, for users who cannot sign typed data in chat. Nothing is signed or submitted here. Base and Solana only. Multi-leg exit plans are only on the website. Percent inputs are versus the live price: targetPct above, stopPct below, floorPct = max slippage past the stop.
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": {
"owner": "<owner>",
"tokenIn": "<tokenIn>",
"tokenOut": "<tokenOut>",
"amountIn": "<amountIn>",
"type": "<type>"
},
"name": "prepare_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | Expiry in days (1–30, default 7). | |
| type | Yes | ||
| chain | No | 'base' or 'solana'. | |
| owner | Yes | The user's wallet address (address only, never a key). | |
| stopPct | No | ||
| tokenIn | Yes | Token to sell (ERC-20 address on Base, mint on Solana). | |
| amountIn | Yes | Integer amount of tokenIn in its smallest unit. | |
| dcaHours | No | ||
| floorPct | No | ||
| tokenOut | Yes | Token to receive. | |
| trailPct | No | ||
| dcaSlices | No | ||
| targetPct | No |