📜 Get latest Bitcoin block
Code samples
GET /api/v1/btc/block/last
Returns the most recent block from the Bitcoin blockchain using getbestblockhash followed by getblock with verbosity 2.
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 | Latest Bitcoin block | BtcBlock |
| 500 | Internal Server Error | Could not connect to BTC node | None |