Skip to content

Total the commissions paid in a year.

GET
/api/expenses/fee-rollup
curl --request GET \
--url 'https://api.tradr.cloud/api/expenses/fee-rollup?year=1'

Authed. Sums the fees recorded on fills for the year, split by account and by stock versus options, then again per currency. These are per-fill commissions, not the tracked expenses above, and they are already netted into realised P&L — do not add the two together.

year
required
integer
>= 1900 <= 9999

Fee totals for the year.

Media typeapplication/json
object
perCurrencyTotals
Array<object>
object
currency
string
>= 3 characters <= 3 characters
totalFees
string
totalsByAccount
Array<object>
object
accountId
string format: uuid
accountName
string
currency
string
>= 3 characters <= 3 characters
optionsFees
string
stockFees
string
totalFees
string
year
integer
Examplegenerated
{
"perCurrencyTotals": [
{
"currency": "example",
"totalFees": "example"
}
],
"totalsByAccount": [
{
"accountId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"accountName": "example",
"currency": "example",
"optionsFees": "example",
"stockFees": "example",
"totalFees": "example"
}
],
"year": 1
}

Missing or invalid year.