POSTgetchaintips

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

Returns information about all known tips in the block tree. It includes the tip of the main chain as well as the tips of orphaned branches.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsobject[]required

This method takes no parameters. Pass an empty array.

Responses
heightinteger

The height of the chain tip.

hashstring

The block hash of the tip.

branchleninteger

Zero for the main chain, otherwise the length of the branch connecting the tip to the main chain.

statusstring (enum)

The status of the chain.

  • invalid: The 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, but the branch was never fully validated.
  • valid-fork: The branch is fully validated but is not part of the active chain.
  • active: The tip of the active main chain.
X-API-KEY
RequestCU30
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": "getchaintips",
  "params": []
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": [
    {
      "height": 920000,
      "hash": "000000000000000000024bead8df69990852c202db0e0097c1a12ea637d7e96d",
      "branchlen": 0,
      "status": "active"
    },
    {
      "height": 919998,
      "hash": "00000000000000000001b2c4a1de1f5f9b5a3f8e2d7c6b5a4938271605f4e3d2",
      "branchlen": 1,
      "status": "valid-fork"
    }
  ]
}