bitcoind.app
CommandsGuidesContact ↗
Home/Blockchain/getblockchaininfo
Blockchain

getblockchaininfo

Returns an object containing various state info regarding blockchain processing.

Returns

objectChain info including chain, blocks, headers, bestblockhash, difficulty, etc.

Code Examples

curl --user myuser --data-binary '{"jsonrpc":"1.0","id":"1","method":"getblockchaininfo","params":[]}' -H 'content-type:text/plain;' http://127.0.0.1:8332/

Example Response

{
  "chain": "main",
  "blocks": 840000,
  "headers": 840000,
  "bestblockhash": "00000000000000000002a7c4...",
  "difficulty": 86388558925171.02,
  "time": 1713571767,
  "mediantime": 1713569243,
  "verificationprogress": 0.9999991,
  "pruned": false
}
← Previous
getblock
Next →
getblockcount

More Blockchain Commands

getbestblockhashgetblockgetblockcountgetblockfiltergetblockhashgetblockheader

bitcoind.app — Bitcoin Core RPC Reference

GuidesContact ↗