Bitcoin
Bitcoin
Bitcoin
Das Free-Tier deckt persönliche Projekte ab. Pay-as-you-go skaliert ohne Karte.
getblockhash takes a block height and returns the hex hash of the block at that position on Bitcoin's active chain. Most Bitcoin block RPCs — getblock, getblockheader, getblockstats — are keyed by hash rather than height, so this method is the bridge that turns a human-friendly height (the genesis block is 0, and each later block adds another ~10 minutes of BTC settlement) into the hash those calls expect. Send the request to https://bitcoin.therpc.io/YOUR_API_KEY with the height as the single positional parameter.
getblock or getblockheader.| # | Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|---|
| 1 | height | number | Ja | Block height in the active chain. |
| Typ | Beschreibung |
|---|---|
| string | Hex block hash at the given height. |
| Code | Meldung | Ursache |
|---|---|---|
-8 | Block height out of range | The requested height is negative or above the current tip height. |
-8, "Block height out of range".