Skip to main content

getchaintips

POST

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.
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
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.
codestringrequired
Code identifying the cause of the failed request.
messagestringrequired
Detailed message including the name and value of the invalid parameter.
{
"code": "ERROR_CODE",
"message": "Unauthorized"
}
cURL
curl -X POST 'https://bitcoin-mainnet.nodit.io' \
-H 'Content-Type: application/json' \
-H 'X-API-KEY: nodit-demo' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "getchaintips",
"params": []
}'