GET /api/stats
Public aggregate network stats. The landing page hero ticker, the /status dashboard, and any third-party uptime / growth tracker can pull from this endpoint.
The underlying Nostr scan is heavy-cached (10 minutes) because it queries every configured discovery relay. The response includes a cached_at timestamp and window_minutes so consumers can show freshness.
GET https://ochk.io/api/stats
No parameters.
Response (200)
{
"cached_at": "2026-04-21T12:00:00Z",
"window_minutes": 10,
"attestations": {
"total": 142,
"by_scheme": { "bip322": 139, "legacy": 3 }
},
"identities": {
"total_bindings": 384,
"by_protocol": {
"nostr": 185,
"github": 102,
"twitter": 61,
"dns": 36
}
},
"addresses": {
"unique": 127
},
"bond": {
"sampled": 48,
"median_sats": 500000,
"p90_sats": 5000000,
"total_declared_sats": 78400000
},
"relays": [
"wss://relay.damus.io",
"wss://relay.nostr.band",
"wss://nos.lol"
],
"featured": {
"attestation_id": "a3f5b8c2…",
"address": "bc1q...",
"scheme": "bip322",
"issued_at": "2026-04-21T11:43:00Z"
},
"service": {
"uptime_seconds": 782341,
"environment": "production",
"version": "0.1.0"
}
}
Fields
| Field | Notes |
|---|---|
cached_at | When the Nostr scan was last run. |
window_minutes | Cache TTL — consumers can label as "updated N minutes ago". |
attestations.total | Distinct proofs seen across relays. |
attestations.by_scheme | Breakdown by bip322 / legacy. |
identities.total_bindings | Sum of handle bindings across attestations. |
identities.by_protocol | Breakdown by handle protocol. |
addresses.unique | Distinct Bitcoin addresses that have published at least one proof. |
bond.sampled | How many attestations carried a bond: we could read. |
bond.median_sats / p90_sats | Bond-value summary stats. |
bond.total_declared_sats | Sum of all declared bonds. Advisory — not verified against chain state. |
relays | Nostr relays scanned. |
featured | Most-recently-issued attestation. Nullable. |
service.uptime_seconds | Hosted-verifier process uptime. |
service.environment | production / development. |
service.version | npm_package_version of the verifier. |
Example
curl "https://ochk.io/api/stats" | jq '.attestations.total'
const r = await fetch('/api/stats');
const { attestations, addresses, identities } = await r.json();
Behavior notes
- Not verified. The stats are summarised directly from Nostr events — no signature verification or chain-state recomputation per row. For authoritative per-row data, call
/api/checkwith the address or ID. - Cache warm time. First request after TTL expiry triggers a full Nostr scan; can take 10–30 s depending on relay latency. Subsequent requests within the window return cached data in milliseconds.
- Featured attestation is the most recent by
issued_at. The landing-page hero uses this to render a live proof card.
Rate limit
30 req/min per IP.
Status codes
| HTTP | Meaning |
|---|---|
200 | Stats returned. |
429 | Rate limited. |
500 | Server error (falls back to stale cache when available). |