Bitcoin
Bitcoin
Bitcoin
Free tier covers personal projects. Pay-as-you-go scales without a card.
getblockchaininfo returns a single snapshot of how the Bitcoin node sees the chain that carries BTC value: which network it is on, the current block height, the best (tip) block hash, the active Proof-of-Work difficulty, the median and tip timestamps, and the verificationprogress figure that runs from 0 toward 1 as the node catches up. It is the most efficient first call to make against https://bitcoin.therpc.io/YOUR_API_KEY, because one round trip tells you whether the node is synced and ready before you spend further calls reading individual blocks or outputs.
blocks height before you start reading block or UTXO data.initialblockdownload to learn whether the node is still downloading history and not yet trustworthy for tip data.chain field to confirm which network the endpoint serves — main, test, signet, or regtest.blocks and verificationprogress and alerting if they stall.This method takes no parameters. Pass an empty array [].
| Type | Description |
|---|---|
| object | chain, blocks (height), headers, bestblockhash, difficulty, time, mediantime, verificationprogress (0–1), initialblockdownload, chainwork, size_on_disk, pruned, softforks, warnings. |
verificationprogress creeps toward 1 but almost never reads exactly 1.0, so gate your "synced" decision on the boolean initialblockdownload being false rather than on the float.softforks field has changed shape across Bitcoin Core versions, so do not hard-code a fixed layout — read it defensively or ignore deployments you do not need.