Delete a trade
delete_tradeDeletes a trade recorded by mistake, as the trade list on the page does: the cash it moved goes back, the holding is recomputed, and a buy's journal entry goes with it while it is still exactly that buy. A deleted sell does not reopen the journal entries it closed. A buy whose shares a later sell used is refused until that sell is changed. Sent without preview_id, it changes nothing and returns a preview of the change with a preview_id; sent again with the same arguments and that preview_id, it makes the change.
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": {
"id": "<id>"
},
"name": "delete_trade"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The trade id, from get_trades or record_trade. | |
| preview_id | No | The preview_id that the same call without it returned. Without it, nothing is changed. |