> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snek.fun/llms.txt
> Use this file to discover all available pages before exploring further.

# Balances API

> Holders, PnL, and per-address balances for Snekfun tokens

# Balances API

**Production:** Ingress base is `https://analytics.snek.fun/balances` (this path does **not** include `v1`). API routes live under **`/v1/...`** — full URLs look like `https://analytics.snek.fun/balances/v1/pool/holders`.

**Local dev:** `http://127.0.0.1:7046` (see service `http.port` in config). The service exposes the same paths under **`/v1/...`** on that host — there is no `/balances` prefix locally (e.g. `http://127.0.0.1:7046/v1/pool/holders`).

This HTTP service exposes **read** endpoints backed by the balances pipeline: ranked holders, PnL cards, and aggregate balances in ADA for a set of payment key hashes.

**Auth:** All endpoints documented here are **public** (no API key or cookie).

**WebSocket:** This service does **not** expose WebSocket endpoints — use HTTP only.

## Endpoints

| Topic                                                      | Description                                       |
| ---------------------------------------------------------- | ------------------------------------------------- |
| [Pool holders](/api-reference/balances-api/holders)        | Paged list of holders, dev balance, total count   |
| [PnL card](/api-reference/balances-api/pnl-card)           | Profit/loss summary for wallets and an asset      |
| [Asset balance](/api-reference/balances-api/asset-balance) | Aggregate balance in ADA for wallets and an asset |

## Interactive spec

[Swagger UI](/api-reference/balances-api/swagger) lists OpenAPI for this service when it is running (typically `GET /docs` on the same host; production example: `https://analytics.snek.fun/balances/docs`).

## Identifiers

Use the same **asset ID** and **PKH** conventions as in [API introduction](/api-reference/overview#common-identifiers).
