Chain Info

Get Blockchain Info

This endpoint retrieves information about the state of the chain for the selected network.

HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/chain/info
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/chain/info"
Response JSON structure
{
    "chain": "main",
    "blocks": 635302,
    "headers": 635299,
    "bestblockhash": "000000000000000002a40d7410a6c08109521c14f4cf354e7b352b4eab8aa4ea",
    "difficulty": 287310033717.7086,
    "mediantime": 1589703256,
    "verificationprogress": 0.9999754124031851,
    "pruned": false,
    "chainwork": "0000000000000000000000000000000000000000010969f724913e0fe59377f4"
}

URL Parameters

Get Circulating Supply

This endpoint retrieves the circulating supply of BSV.

HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/circulatingsupply
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/circulatingsupply"
Response
18227675

URL Parameters

Get Chain Tips

This endpoint retrieves information about all known tips in the block tree.

The possible values for status:

  1. invalid: This branch contains at least one invalid block.

  2. headers-only: Not all blocks for this branch are available, but the headers are valid.

  3. valid-headers: All blocks are available for this branch, but they were never fully validated.

  4. valid-fork: This branch is not part of the active chain, but is fully validated.

  5. active: This is the tip of the active main chain, which is certainly valid.

HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/chain/tips
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/chain/tips"
Response JSON structure
[
  {
    "height": 721622,
    "hash": "000000000000000005693b8ef945a19fd269d2b19ebbad74e3d98d4427b2f1e0",
    "branchlen": 0,
    "status": "active"
  },
  {
    "height": 721213,
    "hash": "00000000000000000478d6745b0f4060f1a00c143846a99b2dd6e1ee0e7492a0",
    "branchlen": 1,
    "status": "valid-fork"
  },
  ...
]

URL Parameters

Get Peer Info

This endpoint retrieves information on peers connected to the node.

HTTP Request
GET https://api.whatsonchain.com/v1/bsv/<network>/peer/info
cURL
curl --location --request GET "https://api.whatsonchain.com/v1/bsv/main/peer/info"
Response JSON structure
[
  {
    "id": 326,
    "addr": "<address>",
    "addrlocal": "<address-local>",
    "services": "0000000000000021",
    "relaytxes": true,
    "lastsend": 1665409946,
    "lastrecv": 1665409976,
    "bytessent": 890791261,
    "bytesrecv": 2960980299,
    "conntime": 1654039986,
    "timeoffset": 0,
    "pingtime": 0.000493,
    "minping": 0.000303,
    "version": 70016,
    "subver": "/Bitcoin SV:1.0.11/",
    "inbound": true,
    "addnode": false,
    "startingheight": 1493982,
    "txninvsize": 0,
    "banscore": 0,
    "synced_headers": 1515937,
    "synced_blocks": 1515937,
    "whitelisted": false,
    "bytessent_per_msg": {
      "addr": 11220,
      "blocktxn": 0,
      "cmpctblock": 24060,
      "feefilter": 0,
      "getaddr": 0,
      "getdata": 26657339,
      "getheaders": 1085,
      "headers": 876489,
      "inv": 50080517,
      "notfound": 61,
      "ping": 3031616,
      "pong": 3031648,
      "reject": 664,
      "sendcmpct": 66,
      "sendheaders": 24,
      "tx": 807054746,
      "verack": 24,
      "version": 147
    },
    "bytesrecv_per_msg": {
      "addr": 55,
      "blocktxn": 1174185732,
      "cmpctblock": 1732490,
      "feefilter": 192,
      "getaddr": 24,
      "getdata": 3864931,
      "getheaders": 1085,
      "headers": 1471198,
      "inv": 133115380,
      "notfound": 61,
      "ping": 3031648,
      "pong": 3031616,
      "reject": 0,
      "sendcmpct": 33,
      "sendheaders": 24,
      "tx": 471157544,
      "verack": 24,
      "version": 147
    }
  }
  ...
]

URL Parameters

Last updated