log_trade
Log a trade (buy / sell / swap), expressed as from-asset to to-asset. Same body and validation as POST /api/transactions.
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": {
"tx_date": "<tx_date>",
"from_account": "<from_account>",
"from_provider": "<from_provider>",
"from_ticker": "<from_ticker>",
"from_asset": "<from_asset>",
"from_amount": "<from_amount>",
"to_account": "<to_account>",
"to_provider": "<to_provider>",
"to_ticker": "<to_ticker>",
"to_asset": "<to_asset>",
"to_amount": "<to_amount>",
"overall_eur_value": "<overall_eur_value>"
},
"name": "log_trade"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_risk | No | ||
| tx_date | Yes | Today or tomorrow at the latest (the user's own calendar day); later dates are rejected | |
| tx_time | No | Optional HH:MM on the user's own clock; orders rows within the same day. Omitted: an edit keeps the stored time, a new row takes the current time | |
| to_asset | Yes | ||
| from_risk | No | ||
| to_amount | Yes | ||
| to_ticker | Yes | ||
| from_asset | Yes | ||
| to_account | Yes | ||
| description | No | ||
| from_amount | Yes | ||
| from_ticker | Yes | ||
| to_category | No | ||
| to_provider | Yes | ||
| from_account | Yes | ||
| from_category | No | ||
| from_provider | Yes | ||
| to_description | No | ||
| allow_new_values | No | Create accounts/providers/tickers not yet in reference-data. Default false. | |
| from_description | No | ||
| overall_eur_value | Yes | The trade's total value in the ledger's base currency (the field name is historical: EUR was the only base) |