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

# Stats & historical data

> Aggregate and historical endpoints served from the Ponder indexer — burns, protocol snapshot, activity feed, and price history.

These endpoints are backed by the **Ponder indexer**, which reconstructs
protocol state from on-chain events into Postgres. They return in
milliseconds and scale to many concurrent readers — unlike the live
`eth_getLogs` reads behind the `/api/v1/public/*` endpoints.

<Note>
  On Base mainnet, production volumes are near zero — these endpoints
  report the **real** indexed values (often `0`), never placeholder numbers.
</Note>

## Base URL

```
https://lumina-api-production-ac85.up.railway.app
```

All endpoints below are **public** (no API key) and IP-rate-limited.

## Aggregate stats

### `GET /api/v1/stats/burns`

Burn dashboard: total LUMINA burned, premium USDC volume, last-30-day burn,
count, and a per-day series.

```json theme={null}
{
  "total_lumina_burned": "0",
  "total_usdc_volume": "0",
  "last_30_days_burned": "0",
  "burns_count": 0,
  "by_day": [{ "day": "2026-05-26", "lumina_burned": "0", "usdc_spent": "0" }]
}
```

### `GET /api/v1/stats/protocol`

Protocol-wide snapshot.

```json theme={null}
{
  "active_policies": 0,
  "bonds_outstanding_usd": "0",
  "total_premium_collected": "0",
  "marketplace_volume_total": "0",
  "lumina_total_burned": "0",
  "lumina_circulating": "100000000000000000000000000"
}
```

`lumina_circulating` is derived as total supply (100M) − total burned.

### `GET /api/v1/stats/activity`

Unified reverse-chronological feed (max 100) across policy purchases, bond
mints/redemptions, marketplace buys, and burns.

```json theme={null}
{ "events": [
  { "type": "policy_purchased", "actor": "0x…", "amount": "100000000", "ref": "12", "tx_hash": "0x…", "block_number": "42037031", "block_timestamp": "1779…" }
], "count": 1 }
```

`type` ∈ `policy_purchased | bond_minted | bond_redeemed | marketplace_buy | lumina_burned`.

### `GET /api/v1/stats/lumina-price-history?range=24h`

Effective LUMINA/USDC price points from each `BurnExecuted`. `range` ∈
`24h | 7d | 30d | all`.

## Per-wallet (indexed)

| Endpoint                                     | Returns                                              |
| -------------------------------------------- | ---------------------------------------------------- |
| `GET /api/v1/policies/by-buyer/:address`     | Policies for a buyer (paginated `limit`/`offset`).   |
| `GET /api/v1/bonds/by-owner/:address`        | Net bond holdings per epoch (issued − redeemed > 0). |
| `GET /api/v1/triggers/recent?limit=50`       | Recent trigger submissions.                          |
| `GET /api/v1/marketplace/active-listings`    | Active marketplace listings.                         |
| `GET /api/v1/marketplace/recent-sales`       | Filled listings.                                     |
| `GET /api/v1/burns/recent?source=TWAPBurner` | Recent burn events.                                  |

<Note>
  The legacy on-chain `/api/v1/public/policies/:wallet` and
  `/api/v1/public/bonds/:wallet` endpoints remain available and return the same
  data via a live on-chain scan — use them as a fallback if `/indexer/health`
  reports the indexer is `syncing` or `lagging`.
</Note>

## Indexer health

### `GET /api/v1/indexer/health`

```json theme={null}
{ "status": "synced", "lastSyncedBlock": "42037031", "headBlock": "42037050", "lagBlocks": "19" }
```

`status` ∈ `synced | lagging | syncing`. Returns `503` if the indexer/DB is
not provisioned.
