Get financial statistics
GET
/stats
const url = 'http://localhost:8000/api/v1/stats?period=day&preset=all_time§ion=overview';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'http://localhost:8000/api/v1/stats?period=day&preset=all_time§ion=overview' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ” start_date
string format: date
end_date
string format: date
wallet_ids
Comma-separated wallet IDs
string
period
string
preset
Preset date range (overrides start_date/end_date)
string
section
Compute only one section of the response for progressive loading. Omit for the full payload.
string
Responses
Section titled “ Responses ”Statistics retrieved successfully
Media type application/json
object
data
object
currency
Currency used for all amounts
string
overview
object
total_balance
number format: float
net_worth
number format: float
total_income
number format: float
total_expenses
number format: float
net_cash_flow
number format: float
avg_monthly_income
number format: float
avg_monthly_expenses
number format: float
savings_rate
number format: float
Example generated
{ "data": { "currency": "example", "overview": { "total_balance": 1, "net_worth": 1, "total_income": 1, "total_expenses": 1, "net_cash_flow": 1, "avg_monthly_income": 1, "avg_monthly_expenses": 1, "savings_rate": 1 } }}