Summarise a tax year.
const url = 'https://api.tradr.cloud/api/expenses/tax-summary?year=1';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.tradr.cloud/api/expenses/tax-summary?year=1'Authed. Realised P&L (split short- and long-term), tracked expenses by category, and wash-sale or superficial-loss flags for the user’s jurisdiction. Deliberately reports no single net taxable figure: fees are already inside realised P&L, and combining the numbers correctly depends on rules Tradr does not model.
Under the FIFO lot method, realisedPnl is computed from matched lots and lotRealisations carries one row per (exit fill, lot) pair, each with its own term for US. Under average cost, lotRealisations is empty and the figures are the pooled per-position totals, as today.
Under acb (always the effective method for CA), realisedPnl holds one CAD entry (the sum of the year’s priced disposition gains) and acbDispositions carries one row per disposition from the pooled adjusted cost base across the user’s taxable accounts; registered accounts never join a pool. An unpriced row names its reason; its (currency, trade date) pair appears in acbMissingRates, never in the dateless missingRates, which — like excludedCurrencies — stays empty on this path.
This is a reporting aid, not tax advice, and it is not a filing.
Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters”Responses
Section titled “ Responses ”The summary for the year.
object
One row per pooled ACB disposition under acb; empty otherwise.
object
Decimal CAD.
Decimal.
Decimal CAD.
Decimal CAD.
Decimal CAD.
Decimal.
Distinct (currency, trade date) pairs with no CAD rate that unpriced an acb row; empty otherwise.
object
Wash sales (US) or superficial losses (CA), matched at the lot level (each entry fill is a lot), with the counterparty positions and lots. Under CA, a repurchase in any account of the user — registered accounts included — counts, and the losing position itself can supply the match; a flag never adjusts the figures.
object
One row per (exit fill, lot) pair under FIFO; empty under average cost.
object
Decimal.
Decimal.
Decimal.
Decimal.
Decimal.
object
object
Example
{ "acbDispositions": [ { "unpricedReason": "missing_rate" } ], "jurisdiction": "US", "lotMethod": "fifo", "lotRealisations": [ { "term": "short" } ]}Missing or invalid year.