Bitcoin
Bitcoin
Bitcoin
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
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.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | height | number | نعم | Block height in the active chain. |
| النوع | الوصف |
|---|---|
| string | Hex block hash at the given height. |
| الكود | الرسالة | السبب |
|---|---|---|
-8 | Block height out of range | The requested height is negative or above the current tip height. |
-8, "Block height out of range".