Correct a trade
edit_tradeCorrects a recorded trade's price, quantity or date, as the trade list on the page does: cash moves by the difference, the holding is recomputed, and the journal entry follows where it still matches. fees is what the broker charged; without it the fees are worked out again from the user's settings. The side and the ticker cannot change: that takes deleting the trade and recording the right one. Refused if a sell would then be of shares not held. 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": "edit_trade"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The trade id, from get_trades or record_trade. | |
| fees | No | What the broker charged. Left out: a fee reported before is kept while price and quantity stay the same; otherwise the estimate. | |
| price | No | Price per share. | |
| quantity | No | Shares. | |
| traded_at | No | Trade date in the market, YYYY-MM-DD. | |
| preview_id | No | The preview_id that the same call without it returned. Without it, nothing is changed. |