TAAL Public docs
  • Welcome
  • Introduction
    • Get an API Key
  • Core Products
    • WhatsOnChain
      • Health
      • Chain Info
      • Block
      • Transaction
      • Mempool
      • (Un)Spent Transaction Outputs
      • Address
      • Script
      • Exchange Rate
      • Search
      • WoC Widgets
      • WoC Plugins
      • On-Chain Data
      • Output Tags
      • Stats
      • WebSockets
        • WoC Sockets V1 (Deprecated)
        • WoC Sockets V2 (Beta)
      • Tokens
        • 1Sat Ordinals (Beta)
        • BSV-21 (Beta)
        • STAS Tokens (Beta)
      • Change Log
      • Community Libraries
    • Transaction Processing
      • ARC Endpoints
      • Transaction format and fee rate
    • TAAL Wallet
      • Introduction
      • Architecture
      • Terminology
      • UI Elements
      • Tutorial
    • 1Sat Ordinals tokens API
      • Introduction
      • Terminology
      • Flow Diagram
      • Basic Tutorial - Node
      • Basic Tutorial - Postman
      • API
  • Resources
    • FAQ
    • Support
    • Glossary
    • Acronyms and Abbreviations
Powered by GitBook
On this page
  • Get Blockchain Info
  • Get Circulating Supply
  • Get Chain Tips
  • Get Peer Info

Was this helpful?

Export as PDF
  1. Core Products
  2. WhatsOnChain

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

Parameter
Description

network

The selected network: main or test.

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

Parameter
Description

network

The selected network: main.

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

network

The selected network: main.

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

network

The selected network: main.

PreviousHealthNextBlock

Last updated 7 months ago

Was this helpful?