Try it
Returns:
Swap 850000 for any non-negative block height. An invalid or missing height returns a 400 with a short JSON error instead of a crash.
Fields
| Field | Meaning |
|---|---|
| height | The block height you requested, echoed back. |
| era | 1-indexed halving era that height belongs to. |
| rewardBtc | Block subsidy in BTC during that era — 0 once issuance ends (era > 33, around the year 2140). |
| blocksIntoEra | How many blocks into the era this height is (0-indexed). |
| blocksUntilNextHalving | Blocks remaining until the next halving, counted from this height. |
| nextHalvingBlock | The block height where the next halving occurs. |
What this is not
This isn't a blockchain explorer or a live node — it doesn't know the current block height, and it never phones out to check. It's pure arithmetic against the protocol's fixed schedule, the same schedule Chapter 1 and Chapter 5 work through by hand. If you need the current tip height, pair this with any block explorer's API and feed the result in here.
Details for integrators
- CORS:
Access-Control-Allow-Origin: *— call it directly from a browser, no proxy needed. - Caching: responses are cacheable for 24 hours (
Cache-Control: public, max-age=86400) — the answer for a given height never changes, so cache it aggressively on your end too. - No rate limits enforced as of this writing, but be reasonable — this runs on Cloudflare Pages Functions, not a dedicated backend.
- Uptime: best-effort, no SLA. It's a free static-adjacent endpoint on a hobby project, not a paid service.