curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"method": "getblockchaininfo",
"params": [],
"id": 1
}'
{
"result": {},
"error": {},
"id": 123
}
curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '{
"jsonrpc": "1.0",
"method": "getblockchaininfo",
"params": [],
"id": 1
}'
{
"result": {},
"error": {},
"id": 123
}
getblockchaininfo
method returns an object containing various state info regarding blockchain processing.
none
result
— an object containing various state info with the following fields:
chain
— current network name (main, test, regtest)blocks
— the height of the most-work fully-validated chain. The genesis block has height 0headers
— the current number of headers we have validatedbestblockhash
— the hash of the currently best blockdifficulty
— the current difficultymediantime
— median time for the current best blockverificationprogress
— estimate of verification progress [0..1]initialblockdownload
— (debug information) estimate of whether this node is in Initial Block Download modechainwork
— total amount of work in active chain, in hexadecimalsize_on_disk
— the estimated size of the block and undo files on diskpruned
— if the blocks are subject to pruningpruneheight
— lowest-height complete block stored (only present if pruning is enabled)automatic_pruning
— whether automatic pruning is enabled (only present if pruning is enabled)prune_target_size
— the target size used by pruning (only present if automatic pruning is enabled)softforks
— status of softforksbip9_softforks
— status of BIP9 softforks in progresswarnings
— any network and blockchain warningserror
— an object containing an error message if an error occurred, otherwise null
id
— an integer representing the ID of the request, used to match requests with responsesgetblockchaininfo
method is useful for retrieving various state information about the blockchain. This information can be used for monitoring the health and progress of the blockchain, as well as for making decisions in blockchain-based applications. For example, a mining pool might use the difficulty
field to adjust the pool’s target share difficulty.Various state info regarding blockchain processing
The response is of type object
.
Was this page helpful?