List trading expenses.
GET
/api/expenses
const url = 'https://api.tradr.cloud/api/expenses?page=0&pageSize=100';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?page=0&pageSize=100'Authed. Expenses are the costs of trading that are not per-fill commissions — data subscriptions, platform fees, software, hardware, education. Commissions belong to fills and appear in the fee rollup instead. filterTotals covers the whole active filter, not just the page. Note page is zero-based here.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”year
integer
Omit for all years.
page
integer
pageSize
integer
Responses
Section titled “Responses”One page of expenses plus the totals for the active filter.
Media typeapplication/json
object
expenses
Array<object>
A cost of trading that is not a per-fill commission.
object
amount
Positive decimal
string
category
string
createdAt
string format: date-time
currency
string
description
string
id
string format: uuid
notes
string
occurredAt
string format: date
updatedAt
string format: date-time
userId
string format: uuid
filterTotals
object
hasMore
boolean
page
integer
pageSize
integer
Example
{ "expenses": [ { "category": "data_subscription" } ]}