---
title: "Returns a zero-filled, oldest-first series of the caller's available token balance at the end of each bucket."
method: GET
path: "/api/wallet/balance-history"
tags: ["wallet"]
---

# Returns a zero-filled, oldest-first series of the caller's available token balance at the end of each bucket.

`GET /api/wallet/balance-history`

## Request

- Base URL: `https://api.pricklymails.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pricklymails.com/api/wallet/balance-history`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

## Query parameters

- `granularity` string
- `days` integer

## Response `200`

Zero-filled, oldest-first available-balance series.

- BalanceHistoryRangeResponse: JSON response body for `GET /api/wallet/balance-history`.
  - `points` BalanceHistoryRangePoint[], required: The available balance series, oldest first.
    - `balance` integer, required: Available token balance at the end of the bucket.
    - `date` string, required: Start of the bucket, as an RFC 3339 timestamp, which keeps the hour for the `"hour"` granularity.

## Other responses

- `401`: Missing or invalid API key, session token, or agent token.
- `403`: The key or agent token lacks the `billing:read` scope.

---

[API](https://skmtc.dev/pricklymails/apis/pricklymails-api.md) · [All operations](https://skmtc.dev/pricklymails/apis/pricklymails-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pricklymails/apis/pricklymails-api/revisions/b4225a92d8fb?raw)
