API Documentation btc·monitor

On-chain Bitcoin metrics computed from a self-hosted Bitcoin Core node. / ข้อมูล on-chain จากโหนด Bitcoin ของเราเอง

← Home

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

MethodGET
URLhttps://btc.kaetkung.uk/api/onchain
AuthAuthorization: Bearer <token>
Returnsapplication/json
CORSEnabled (Access-Control-Allow-Origin: *)

Example request:

curl -H "Authorization: Bearer YOUR_TOKEN" \ https://btc.kaetkung.uk/api/onchain

JavaScript (fetch):

const res = await fetch("https://btc.kaetkung.uk/api/onchain", { headers: { Authorization: "Bearer YOUR_TOKEN" }, }); const data = await res.json(); console.log(data.metrics.mvrv.value);

Response shape

{ "generated_at": "2026-06-26T00:00:00.000Z", // ISO build time "tip_date": "2026-06-25", // newest data date "count": 118, // number of metrics "source": "Self-hosted Bitcoin Core node + free on-chain data (btc-monitor)", "note": "...", "metrics": { "mvrv": { "title": "MVRV Ratio", "value": 1.83, // number | null (scalar metrics) "value_json": null, // object | null (composite metrics, e.g. cohorts/HODL) "unit": "ratio", "date": "2026-06-25", // date this value is for "source": "own-engine", "zone": null, // optional zone label "status": "ok", // ok | fallback | stale | missing "page": "market", "section": "valuation", "description": "Market cap over realized cap ..." } // ... one entry per metric, keyed by metric key } }

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

CodeMeaning
200OK — JSON snapshot returned
401Missing or invalid bearer token
405Method not allowed (use GET)
503Server token not configured

Public history (no auth)

The full daily history of any single metric is available as a static file — no token needed:

GET https://btc.kaetkung.uk/data/series/<metric_key>.json -> { "key": "mvrv", "unit": "ratio", "points": [ { "date": "2010-07-18", "value": 0.93 }, ... ] } GET https://btc.kaetkung.uk/data/metrics.json // list of all metric keys + meta GET https://btc.kaetkung.uk/data/status.json // freshness / source health

Data is a once-daily snapshot. Not financial advice. / ข้อมูลอัปเดตวันละครั้ง ไม่ใช่คำแนะนำการลงทุน