Book Lightyear Trades
book_lightyear_tradesBooks Lightyear stock buy/sell trades into e-arveldaja with a dry run by default; sells require a capital gains file for FIFO cost basis and gain/loss recognition.
Instructions
Book Lightyear stock Buy/Sell trades. DRY RUN by default. For sells, capital_gains_file is required for FIFO cost basis and recognized gain/loss. A USD trade with no 1:1 conversion goes through the USD pool (the USD held at Lightyear): a sell kept in USD is valued at the ECB rate and matched to its capital-gains row by exact date and time; a buy paid partly (at most one EUR→USD conversion up to 60 s before it) or fully from the pool is valued at the dealt rate for the converted part and the ECB rate for the pool part, relieves the pool at average carrying value and books the difference on fx_account. A USD→EUR conversion with no trade relieves the pool too: the conversion fee goes to fee_account, the difference between the relief and the EUR received plus fee to fx_account; with no fee and no difference it is recorded in the pool without a journal (status would_record / recorded).
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": {
"investment_account": "<investment_account>",
"broker_account": "<broker_account>"
},
"name": "book_lightyear_trades"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dry_run | No | Preview without creating entries (default true) | |
| file_ref | No | Opaque Lightyear AccountStatement file reference. | |
| file_path | No | AccountStatement path/base64 input. Provide exactly one of file_path or file_ref. | |
| fx_account | No | Realised FX gain/loss account for buys paid from the USD cash fund (default: auto-detect 'Kasum/kahjum valuutakursi muutustest', standard 8500). | |
| fee_account | No | Account for EXPENSED trade fees — every Buy and Sell fee, both the platform fee and the FX-conversion fee (default: auto-detect 'Kulu aktsiatelt ja osadelt', standard 8335). No fee is capitalized into the investment cost: Lightyear's FIFO cost basis is fee-exclusive, and RTJ 3 expenses transaction costs on assets held at fair value through profit or loss. | |
| plan_handle | No | Execution-plan handle from the reviewed dry run. Required for dry_run=false. | |
| loss_account | No | Realized loss account, debited on a sell loss (default: auto-detect 'Kulu aktsiatelt ja osadelt', standard 8335) | |
| skip_tickers | No | Comma-separated tickers to skip (default: BRICEKSP, ICSUSSDP). Pass "none" to disable; the empty string is treated as the default. | |
| broker_account | Yes | Broker cash account (e.g. 1120 Lightyear konto) | |
| gain_loss_account | No | Realized gain account, credited on a sell gain (default: auto-detect 'Tulu aktsiatelt ja osadelt', standard 8330) | |
| lightyear_account | No | Lightyear account id (e.g. CHZELUU) for the USD pool when the statement's file name does not carry it. | |
| capital_gains_file | No | Absolute path to Lightyear CapitalGainsStatement CSV (required for sell entries) | |
| investment_account | Yes | Investment/securities account (e.g. 1550 Finantsinvesteeringud) | |
| broker_dimension_id | No | Dimension ID for broker account (accounts_dimensions_id) | |
| capital_gains_file_ref | No | Opaque Lightyear capital-gains file reference; exclusive with capital_gains_file. | |
| investment_dimension_id | No | Dimension ID for investment account (accounts_dimensions_id) |