Parameters
- blockhashstringREQUIRED
The hash of the block
- verboseboolean
default=true. It's true for a JSON object and false for the hex-encoded data
Returns
- resultstring | object
Hex-encoded header when verbose is false, or a header JSON object when verbose is true (default)
- hashstring
The hash of the block
- confirmationsinteger
The number of confirmations, or -1 if the block is not on the main chain
- heightinteger
The block height or index
- versioninteger
The block version
- versionHexstring
The block version formatted in hexadecimal
- merklerootstring
The merkle root
- timeinteger
The block time expressed in UNIX epoch time
- mediantimeinteger
The median block time expressed in UNIX epoch time
- nonceinteger
The nonce
- bitsstring
The value of the nBits field in the block header
- targetstring
The current proof-of-work target
- difficultynumber
The estimated amount of work done to find this block relative to the estimated amount of work done to find block 0
- chainworkstring
Expected number of hashes required to produce the current chain
- nTxinteger
The number of transactions in the block
- previousblockhashstring
(Optional) The hash of the previous block (if available)
- nextblockhashstring
(Optional) The hash of the next block (if available)
- errorobject | null
(Optional) Present when the call fails (no
result). Omitted or null on success.- codeinteger
Bitcoin Core JSON-RPC error code (e.g.
-8for invalid parameter)
- messagestring
Human-readable error (e.g. hash length validation)
1{2"jsonrpc": "2.0",3"result": "010000007de867cc8adc5cc8fb6b898ca4462cf9fd667d7830a275277447e60800000000338f121232e169d3100edd82004dc2a1f0e1f030c6c488fa61eafa930b0528fe021f7449ffff001d36b4af9a",4"id": 15}
1{2"jsonrpc": "2.0",3"result": "010000007de867cc8adc5cc8fb6b898ca4462cf9fd667d7830a275277447e60800000000338f121232e169d3100edd82004dc2a1f0e1f030c6c488fa61eafa930b0528fe021f7449ffff001d36b4af9a",4"id": 15}