log_trade
Log a trade (buy / sell / swap), expressed as from-asset to to-asset. Same body and validation as POST /api/transactions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_risk | No | ||
| tx_date | Yes | ||
| 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) |