Skip to content
These docs describe Tradr v0.17.0. Running an older release? Check the release notes for what changed.

Summarise a tax year.

GET
/api/expenses/tax-summary
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.

year
required
integer
>= 1900 <= 9999

The summary for the year.

Media typeapplication/json
object
acbDispositions

One row per pooled ACB disposition under acb; empty otherwise.

Array<object>
object
acb

Decimal CAD.

string
nullable
accountId
string format: uuid
cadRate

Decimal.

string
nullable
currency
string
exitFillId
string format: uuid
gain

Decimal CAD.

string
nullable
outlays

Decimal CAD.

string
nullable
positionId
string format: uuid
proceeds

Decimal CAD.

string
nullable
quantity

Decimal.

string
realisedAt
string format: date-time
symbol
string
tradeDate
string format: date
unpricedReason
string
nullable
Allowed values: missing_rate pool_unpriced insufficient_pool
acbMissingRates

Distinct (currency, trade date) pairs with no CAD rate that unpriced an acb row; empty otherwise.

Array<object>
object
currency
string
tradeDate
string format: date
displayCurrency
string
nullable
flags

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
jurisdiction
string
nullable
Allowed values: US CA other
lotMethod
string
Allowed values: fifo average acb
lotRealisations

One row per (exit fill, lot) pair under FIFO; empty under average cost.

Array<object>
object
accountId
string format: uuid
basis

Decimal.

string
currency
string
entryFillId
string format: uuid
exitFillId
string format: uuid
fees

Decimal.

string
lotOpenedAt
string format: date-time
net

Decimal.

string
positionId
string format: uuid
proceeds

Decimal.

string
quantity

Decimal.

string
realisedAt
string format: date-time
symbol
string
term
string
nullable
Allowed values: short long
realisedPnl
object
trackedExpenses
object
year
integer
Example
{
"acbDispositions": [
{
"unpricedReason": "missing_rate"
}
],
"jurisdiction": "US",
"lotMethod": "fifo",
"lotRealisations": [
{
"term": "short"
}
]
}

Missing or invalid year.