Parameters
- blockhashstringREQUIRED
The hash of the block
- verbosityinteger
default = 1, 0 for hex-encoded data, 1 for a JSON object, 2 for JSON object with transaction data, and 3 for JSON object with transaction data including prevout information for inputs
Returns
- resultstring | object
Hex-encoded serialized block when verbosity is 0, or a block JSON object when verbosity is 1 or higher.
- hashstring
The block hash
- confirmationsinteger
The number of confirmations
- heightinteger
The block height
- versioninteger
The block version
- versionHexstring
The block version formatted in hexadecimal
- merklerootstring
The merkle root
- timeinteger
The block time in seconds since epoch (Unix time)
- mediantimeinteger
The median block time in seconds since epoch (Unix time)
- nonceinteger
The nonce
- bitsstring
The bits
- targetstring
The target in hexadecimal
- difficultynumber
The difficulty
- chainworkstring
Expected total amount of work in the chain up to this block, in hexadecimal
- nTxinteger
The number of transactions in the block
- previousblockhashstring
The hash of the previous block
- nextblockhashstring
(Optional) The hash of the next block (omitted for the chain tip)
- strippedsizeinteger
The stripped size of the block
- sizeinteger
The size of the block
- weightinteger
The weight of the block
- txarray
Transaction IDs (verbosity 1) or full transaction objects (verbosity 2+)
- coinbase_txobject
Coinbase transaction summary for the block
- versioninteger
Transaction version
- locktimeinteger
Transaction lock time
- sequenceinteger
Coinbase input sequence
- coinbasestring
Coinbase payload hex
- witnessstring
Witness data for the coinbase input (hex on docs-demo)
- errorobject | null
(Optional) JSON-RPC error when the request failed; omitted or null on success
- codeinteger
Error code
- messagestring
Error message
1{2"jsonrpc": "2.0",3"result": {4"hash": "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09",5"confirmations": 932587,6"height": 1000,7"version": 1,8"versionHex": "00000001",9"merkleroot": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33",10"time": 1232346882,11"mediantime": 1232344831,12"nonce": 2595206198,13"bits": "1d00ffff",14"target": "00000000000000000001fca10000000000000000000000000000000000000000",15"difficulty": 1,16"chainwork": "000000000000000000000000000000000000000000000000000003e903e903e9",17"nTx": 1,18"previousblockhash": "0000000008e647742775a230787d66fdf92c46a48c896bfbc85cdc8acc67e87d",19"nextblockhash": "00000000a2887344f8db859e372e7e4bc26b23b9de340f725afbf2edb265b4c6",20"strippedsize": 216,21"size": 216,22"weight": 864,23"tx": [24"fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33"25]26},27"id": 128}
1{2"jsonrpc": "2.0",3"result": {4"hash": "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09",5"confirmations": 932587,6"height": 1000,7"version": 1,8"versionHex": "00000001",9"merkleroot": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33",10"time": 1232346882,11"mediantime": 1232344831,12"nonce": 2595206198,13"bits": "1d00ffff",14"target": "00000000000000000001fca10000000000000000000000000000000000000000",15"difficulty": 1,16"chainwork": "000000000000000000000000000000000000000000000000000003e903e903e9",17"nTx": 1,18"previousblockhash": "0000000008e647742775a230787d66fdf92c46a48c896bfbc85cdc8acc67e87d",19"nextblockhash": "00000000a2887344f8db859e372e7e4bc26b23b9de340f725afbf2edb265b4c6",20"strippedsize": 216,21"size": 216,22"weight": 864,23"tx": [24"fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33"25]26},27"id": 128}