getblockchaininfo

Back to blockchain

Summary

Returns an object containing various state info regarding blockchain processing.

Description

Returns an object containing various state info regarding blockchain processing.

Arguments

None.

Results

  • value (OBJ): No description.
  • chain (STR): current network name (main, test, testnet4, signet, regtest)
  • blocks (NUM): the height of the most-work fully-validated chain. The genesis block has height 0
  • headers (NUM): the current number of headers we have validated
  • bestblockhash (STR): the hash of the currently best block
  • bits (STR_HEX): nBits: compact representation of the block difficulty target
  • target (STR_HEX): The difficulty target
  • difficulty (NUM): the current difficulty
  • time (NUM_TIME): The block time expressed in UNIX epoch time
  • mediantime (NUM_TIME): The median block time expressed in UNIX epoch time
  • verificationprogress (NUM): estimate of verification progress [0..1]
  • initialblockdownload (BOOL): (debug information) estimate of whether this node is in Initial Block Download mode
  • chainwork (STR_HEX): total amount of work in active chain, in hexadecimal
  • size_on_disk (NUM): the estimated size of the block and undo files on disk
  • pruned (BOOL): if the blocks are subject to pruning
  • pruneheight (NUM, optional): height of the last block pruned, plus one (only present if pruning is enabled)
  • automatic_pruning (BOOL, optional): whether automatic pruning is enabled (only present if pruning is enabled)
  • prune_target_size (NUM, optional): the target size used by pruning (only present if automatic pruning is enabled)
  • signet_challenge (STR_HEX, optional): the block challenge (aka. block script), in hexadecimal (only present if the current network is a signet)
  • warnings (ARR): any network and blockchain warnings (run with -deprecatedrpc=warnings to return the latest warning as a single string)
    • value (STR): warning

Examples

qbit-cli getblockchaininfo
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "getblockchaininfo", "params": []}' -H 'content-type: application/json' http://127.0.0.1:8352/