POSTgetblockchaininfo

Bitcoin Mainnethttps://bitcoin-mainnet.nodit.io/

Returns an object containing various state information regarding blockchain processing. It includes the network name, the block height, the best block hash, the difficulty target, the verification progress and the pruning settings.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsobject[]required

This method takes no parameters. Pass an empty array.

Responses
chainstring

The current network name. Returns one of main, test, testnet4, signet or regtest.

예: main

blocksinteger

The height of the most-work fully-validated chain. The genesis block has height 0.

headersinteger

The current number of validated headers.

bestblockhashstring

The hash of the current best block.

bitsstring

nBits, the compact representation of the block difficulty target.

targetstring

The difficulty target, in hexadecimal.

difficultynumber

The current difficulty.

timeinteger

The time of the current best block, expressed in UNIX epoch time.

mediantimeinteger

The median time of the current best block, expressed in UNIX epoch time.

verificationprogressnumber

An estimate of the verification progress. The value ranges from 0 to 1.

initialblockdownloadboolean

Whether the node is in Initial Block Download (IBD) mode.

chainworkstring

The total amount of work in the active chain, in hexadecimal.

size_on_diskinteger

The estimated size of the block and undo files on disk, in bytes.

prunedboolean

Whether the blocks are subject to pruning.

pruneheightinteger

The height of the last block pruned, plus one. Returned only when pruning is enabled.

automatic_pruningboolean

Whether automatic pruning is enabled. Returned only when pruning is enabled.

prune_target_sizeinteger

The target size used by pruning, in bytes. Returned only when automatic pruning is enabled.

signet_challengestring

The block challenge of the signet network, in hexadecimal. Returned only on signet.

warningsstring[]

The list of network and blockchain warnings.

X-API-KEY
RequestCU20
cURL
curl -X POST "https://bitcoin-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "getblockchaininfo",
  "params": []
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "chain": "main",
    "blocks": 920000,
    "headers": 920000,
    "bestblockhash": "000000000000000000024bead8df69990852c202db0e0097c1a12ea637d7e96d",
    "bits": "17038a4f",
    "target": "000000000000000000038a4f0000000000000000000000000000000000000000",
    "difficulty": 150839487445890.6,
    "time": 1701388800,
    "mediantime": 1701386400,
    "verificationprogress": 0.9999987,
    "initialblockdownload": false,
    "chainwork": "00000000000000000000000000000000000000005f6bb1e6d0d1a3d5f6a5b8c1",
    "size_on_disk": 623456789012,
    "pruned": false,
    "warnings": []
  }
}