Chain Info
Get Blockchain Info
This endpoint retrieves information about the state of the specified chain for the selected network.
GET https://api.whatsonchain.com/v1/<chain>/<network>/chain/infoExample Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/chain/info"curl --location --request GET "https://api.whatsonchain.com/v1/btc/main/chain/info"Example Response
{
"chain": "main",
"blocks": 905064,
"headers": 905064,
"bestblockhash": "0000000000000000112ea3732c0417a2cee0130e9217dbba1b0ff078c92c904e",
"difficulty": 51223782275.04099,
"mediantime": 1752242156,
"verificationprogress": 0.9999990488341951,
"pruned": false,
"chainwork": "00000000000000000000000000000000000000000167559704876ce49d636d35"
}{
"chain": "main",
"blocks": 904937,
"headers": 904937,
"bestblockhash": "000000000000000000005c486692de6f8726bd9223bf4a2f80babedff0d44a91",
"difficulty": 116958512019762.1,
"mediantime": 1752160121,
"verificationprogress": 0.9999988962482643,
"pruned": false,
"chainwork": "0000000000000000000000000000000000000000d12c110e37cfdb5d73cdd4ec",
"size_on_disk": 763791035344
}URL Parameters
chain
Desired blockchain: bsv or btc.
network
Selected network: main or test.
Get Circulating Supply
This endpoint retrieves the circulating supply of the specified blockchain.
Example Request
Example Response
URL Parameters
chain
Desired blockchain: bsv or btc.
network
Selected network: main or test.
Get Chain Tips
This endpoint retrieves information about all known tips in the block tree.
The possible values for status:
invalid: This branch contains at least one invalid block.headers-only: Not all blocks for this branch are available, but the headers are valid.valid-headers: All blocks are available for this branch, but they were never fully validated.valid-fork: This branch is not part of the active chain, but is fully validated.active: This is the tip of the active main chain, which is certainly valid.
Example Request
Example Response
URL Parameters
chain
Desired blockchain: bsv or btc.
network
Selected network: main or test.
Get Peer Info
This endpoint retrieves information about peers connected to the node.
Example Request
Example Response
URL Parameters
chain
Desired blockchain: bsv or btc.
network
Selected network: main or test.
Last updated
Was this helpful?