getblock

Returns information about a block, based on the provided block hash.

Path parameters

apiKeystringRequired

Request

This endpoint expects an object.
blockhashstringRequiredformat: "^[a-fA-F0-9]{64}$"

The hash of the block to retrieve.

verbosityenumRequired

Level of detail to return. - 0: hex-encoded string, - 1: basic block info, - 2: with transactions, - 3: with transactions + input prevouts.

Allowed values:

Response

The block object or hex string, depending on verbosity.

hashstring

The block hash.

confirmationsinteger

Number of confirmations or -1 if block not on main chain.

heightinteger

Block height or index.

versioninteger

Block version.

merklerootstring

Merkle root.

timeinteger

Block time in UNIX timestamp.

txlist of strings

List of transaction IDs included in the block.

sizeintegerOptional

Block size in bytes.

strippedsizeintegerOptional

Block size excluding witness data.

weightintegerOptional

Block weight as defined in BIP 141.

versionHexstringOptional

Block version in hex.

mediantimeintegerOptional

Median block time.

nonceintegerOptional

Nonce used for mining.

bitsstringOptional

nBits field of block header.

targetstringOptional

The target threshold for the block’s hash (derived from bits).

difficultydoubleOptional

Difficulty at the time of mining.

chainworkstringOptional

Expected number of hashes to produce the chain.

nTxintegerOptional

Number of transactions in the block.

previousblockhashstringOptional

Hash of the previous block.

nextblockhashstringOptional

Hash of the next block.