👨💻 Get Bitcoin block by hash
Code samples
GET /api/v1/btc/block/hash/{blockHash}
Returns a block by its hash using getblock with verbosity 2.
🛠️ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| blockHash | path | string | true | Bitcoin block hash. |
Example responses
200 Response
{
"hash": "string",
"confirmations": 0,
"height": 0,
"version": 0,
"versionHex": "string",
"merkleroot": "string",
"time": 0,
"mediantime": 0,
"nonce": 0,
"bits": "string",
"difficulty": 0.1,
"chainwork": "string",
"nTx": 0,
"strippedsize": 0,
"size": 0,
"weight": 0,
"previousblockhash": "string",
"nextblockhash": "string",
"tx": [
"string"
]
}
🔁 Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Bitcoin block | BtcBlock |
| 500 | Internal Server Error | Could not connect to BTC node | None |