---
title: "Token accounting change feed"
method: GET
path: "/v1/token-accounting/changes"
tags: ["System"]
---

# Token accounting change feed

`GET /v1/token-accounting/changes`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/token-accounting/changes`
- Auth: HTTP bearer

Ascending-seq committed changes after `after`. Loop `after = nextAfter` until an empty page. `expired` means the cursor is older than the retained window or ahead of the store (as after a restore); drop local state and take a fresh session snapshot.

## Query parameters

- `after` integer
- `limit` integer

## Response `200`

Change page

- TokenLedgerChangesPage
  - `storeId` string, nullable
  - `health` TokenLedgerHealth, required: Store-wide accounting health (shared contract shared/types/contracts/token-accounting.ts). `degraded` means a write failed and observations are held in memory; `unavailable` means the store could not be opened.
    - `state` 'available' | 'degraded' | 'unavailable', required
    - `fault` 'busy' | 'diskFull' | 'permissionDenied' | 'corrupt' | 'migrationFailed' | 'ownedByAnotherProcess' | 'ioError', nullable
    - `nonDurableObservations` integer, required
    - `suppressedObservations` integer, required
    - `quarantinedAttempts` integer, required
    - `unresolvedAttempts` integer, required
    - `oldestUnresolvedAt` string, date-time, nullable
  - `changes` TokenLedgerChange[], required
    - `seq` integer, required
    - `sessionId` string, required
    - `kind` 'attempt' | 'sessionDeleted', required
    - `completionId` string, nullable
    - `attemptOrdinal` integer, nullable
    - `revision` integer, nullable
    - `committedAt` string, date-time, required
  - `nextAfter` integer, required
  - `expired` boolean, required

---

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