Total the commissions paid in a year.
GET
/api/expenses/fee-rollup
const url = 'https://api.tradr.cloud/api/expenses/fee-rollup?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/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.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”year
required
integer
Responses
Section titled “Responses”Fee totals for the year.
Media typeapplication/json
object
perCurrencyTotals
Array<object>
object
currency
string
totalFees
string
totalsByAccount
Array<object>
object
accountId
string format: uuid
accountName
string
currency
string
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.