Account Trends Endpoint
GET
/api/v1/charts/account-trends
const url = 'https://example.com/api/v1/charts/account-trends';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://example.com/api/v1/charts/account-trendsPer-account balance trends over time (converted to base currency).
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Response Account Trends Endpoint Api V1 Charts Account Trends Get
Array<object>
AccountTrendSeriesOne account’s trend data with metadata for legend/colors.
data[].balance is always the account’s raw, unsigned converted
balance – this endpoint never applies a sign flip itself. A caller
that needs a net-worth-style signed value (e.g. a stacked chart
summing multiple accounts, or a per-account display that should
read negative for a liability) negates it itself using
is_liability, matching chart_service.get_net_worth()’s sign
convention.
object
account_id
required
Account Id
integer
name
required
Name
string
is_liability
required
Is Liability
boolean
data
required
Data
Array<object>
AccountTrendPointSingle data point in an account trend series.
object
date
required
Date
string
balance
required
Balance
string
Example generated
[ { "account_id": 1, "name": "example", "short_name": "example", "institution": "example", "color": "example", "is_liability": true, "data": [ { "date": "example", "balance": "example" } ] }]Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}