Parameters
- blockhashstringREQUIRED
The hash of the block
- verbositynumeric
Default 1. 0 for hex-encoded data, 1 for JSON object, 2 for JSON object with transaction data
Returns
- (for verbosity = 0):object
Response when
verbosityis0. The JSON-RPC body includesresult(hex-encoded serialized block data),error, andid.- resultstring
A hex-encoded string of the serialized block data
- errorobject | null
JSON-RPC error object when the request failed, or null on success
- idinteger
The JSON-RPC request identifier
- (for verbosity = 1):object
Response when
verbosityis1(the default). The JSON-RPC body includesresult(JSON block object),error, andid.- resultobject
The block information object
- hashstring
The block hash
- confirmationsinteger
The number of confirmations, or -1 if the block is not on the main chain
- sizeinteger
The size of the block
- heightinteger
The block height or index
- versioninteger
The block version
- versionHexstring
The block version formatted in hexadecimal
- merklerootstring
The merkle root
- txarray
An array with transaction ids
- timeinteger
The block time expressed in UNIX epoch time
- mediantimeinteger
The median block time expressed in UNIX epoch time
- nonceinteger
number that miners adjust in order to find a block hash that meets the network's specified difficulty target
- bitsstring
The value of the nBits field in the block header
- difficultyinteger
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
The hash of the previous block
- nextblockhashstring
The hash of the next block
- errorobject | null
JSON-RPC error object when the request failed, or null on success
- idinteger
The JSON-RPC request identifier
1{2"result": {3"hash": "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09",4"confirmations": 935617,5"size": 216,6"height": 1000,7"version": 1,8"versionHex": "00000001",9"merkleroot": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33",10"tx": [11"fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33"12],13"time": 1232346882,14"mediantime": 1232344831,15"nonce": 2595206198,16"bits": "1d00ffff",17"difficulty": 1,18"chainwork": "000000000000000000000000000000000000000000000000000003e903e903e9",19"nTx": 1,20"previousblockhash": "0000000008e647742775a230787d66fdf92c46a48c896bfbc85cdc8acc67e87d",21"nextblockhash": "00000000a2887344f8db859e372e7e4bc26b23b9de340f725afbf2edb265b4c6"22},23"error": null,24"id": 125}
1{2"result": {3"hash": "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09",4"confirmations": 935617,5"size": 216,6"height": 1000,7"version": 1,8"versionHex": "00000001",9"merkleroot": "fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33",10"tx": [11"fe28050b93faea61fa88c4c630f0e1f0a1c24d0082dd0e10d369e13212128f33"12],13"time": 1232346882,14"mediantime": 1232344831,15"nonce": 2595206198,16"bits": "1d00ffff",17"difficulty": 1,18"chainwork": "000000000000000000000000000000000000000000000000000003e903e903e9",19"nTx": 1,20"previousblockhash": "0000000008e647742775a230787d66fdf92c46a48c896bfbc85cdc8acc67e87d",21"nextblockhash": "00000000a2887344f8db859e372e7e4bc26b23b9de340f725afbf2edb265b4c6"22},23"error": null,24"id": 125}