API referenceMetrics

A closing balance per day

What this wallet held at the end of each day, oldest first. Each point is the `balance_after` of the last entry on or before that day, which is the ledger's own running total — so a sparkline drawn from this agrees with the statement rather than approximating it. A day with no movement repeats the previous close, because that is what the balance was. Days before the wallet held anything are omitted rather than reported as zero: a leading zero draws a rise out of an account that did not exist.

GET
/api/b/v1/metrics/balance-history

What this wallet held at the end of each day, oldest first.

Each point is the balance_after of the last entry on or before that day, which is the ledger's own running total — so a sparkline drawn from this agrees with the statement rather than approximating it.

A day with no movement repeats the previous close, because that is what the balance was. Days before the wallet held anything are omitted rather than reported as zero: a leading zero draws a rise out of an account that did not exist.

Authorization

OAuth2PasswordBearer
AuthorizationBearer <token>

In: header

Query Parameters

currency*Currency
Length3 <= length <= 3
days?Days
Range1 <= value <= 365
Default30
admin_access_token?string|null

Response Body

application/json

application/json

curl -X GET "https://example.com/api/b/v1/metrics/balance-history?currency=str"
{  "currency": "string",  "points": [    {      "at": "2019-08-24T14:15:22Z",      "balance_minor": 0    }  ]}