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/info
Example Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/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"
}
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.
GET https://api.whatsonchain.com/v1/<chain>/<network>/circulatingsupply
Example Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/circulatingsupply"
Example Response
19890434.375
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.
GET https://api.whatsonchain.com/v1/<chain>/<network>/chain/tips
Example Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/chain/tips"
Example Response
[{
"height": 905064,
"hash": "0000000000000000112ea3732c0417a2cee0130e9217dbba1b0ff078c92c904e",
"branchlen": 0,
"status": "active"
}, {
"height": 905048,
"hash": "0000000000000000089a618e0f8b8fa5dcc8a201211d09aea1434a1e03c357cf",
"branchlen": 1,
"status": "valid-headers"
},
...
]
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.
GET https://api.whatsonchain.com/v1/<chain>/<network>/peer/info
Example Request
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/peer/info"
Example Response
[{
"id": 14,
"addr": "78.110.160.26:56514",
"addrlocal": "135.181.137.155:8333",
"services": "0000000000000021",
"relaytxes": true,
"lastsend": 1752244985,
"lastrecv": 1752244982,
"bytessent": 9198799,
"bytesrecv": 1112300,
"conntime": 1752211964,
"timeoffset": -58,
"pingtime": 0.042279,
"minping": 0.039421,
"version": 70016,
"subver": "/Bitcoin SV:1.0.16/",
"inbound": true,
"addnode": false,
"startingheight": 905015,
"txninvsize": 0,
"banscore": 0,
"synced_headers": 905064,
"synced_blocks": 905064,
"whitelisted": false,
"bytessent_per_msg": {
"addr": 27507,
"blocktxn": 0,
"cmpctblock": 0,
"feefilter": 0,
"getaddr": 0,
"getdata": 0,
"getheaders": 1053,
"headers": 954,
"inv": 3158821,
"notfound": 0,
"ping": 8832,
"pong": 8832,
"reject": 0,
"sendcmpct": 33,
"sendheaders": 24,
"tx": 5992415,
"verack": 24,
"version": 146
},
"bytesrecv_per_msg": {
"addr": 55,
"blocktxn": 0,
"cmpctblock": 0,
"feefilter": 0,
"getaddr": 24,
"getdata": 109395,
"getheaders": 1053,
"headers": 4801,
"inv": 978214,
"notfound": 0,
"ping": 8832,
"pong": 8832,
"reject": 694,
"sendcmpct": 33,
"sendheaders": 24,
"tx": 0,
"verack": 24,
"version": 147
}
},
...
]
URL Parameters
chain
Desired blockchain: bsv
or btc
.
network
Selected network: main
or test
.
Last updated
Was this helpful?