API Documentation btc·monitor
On-chain Bitcoin metrics computed from a self-hosted Bitcoin Core node. / ข้อมูล on-chain จากโหนด Bitcoin ของเราเอง
Overview
The on-chain API returns the latest daily snapshot of every metric on the dashboard (valuation, holder cohorts, mining, network health, supply, and more) as a single JSON document. Data is recomputed once per day. The endpoint requires a bearer token; the per-metric historical series remain public and need no auth.
Authenticated endpoint
| Method | GET |
| URL | https://btc.kaetkung.uk/api/onchain |
| Auth | Authorization: Bearer <token> |
| Returns | application/json |
| CORS | Enabled (Access-Control-Allow-Origin: *) |
Example request:
JavaScript (fetch):
Response shape
Scalar metrics carry value; composite ones (HODL waves, URPD, address cohorts, node software) carry a structuredvalue_json instead. status reflects freshness: ok/fallback are real values; stale is a carried-forward value awaiting today's recompute.
Status codes
| Code | Meaning |
|---|---|
| 200 | OK — JSON snapshot returned |
| 401 | Missing or invalid bearer token |
| 405 | Method not allowed (use GET) |
| 503 | Server token not configured |
Public history (no auth)
The full daily history of any single metric is available as a static file — no token needed:
Data is a once-daily snapshot. Not financial advice. / ข้อมูลอัปเดตวันละครั้ง ไม่ใช่คำแนะนำการลงทุน