Skip to main content

getchaintips RPC Method

Returns information about all known chaintips in the block tree, including the main chain as well as orphaned branches.

Updated on
Oct 4, 2023

getchaintips RPC Method

Parameters

This method does not accept any parameters

Returns

height
The height of the chain tip
hash
The block hash of the tip
branchlen
Zero for main chain, otherwise length of branch connecting the tip to the main chain
status
The status of the chain, "active" for the main chain. Other possible statuses can be:
invalid
The status will be invalid when the branch contains at least one invalid block
headers-only
The status will be headers-only when only the headers are valid, however all blocks for this branch are not present
valid-headers
The status will be valid-headers when the branch contains all the blocks, but they were never fully validated
valid-fork
The status will be valid-fork when the branch is fully validated and not part of the active chain
active
The status will be active when the branch is the tip of the active main chain, which is certainly valid
error
The error message, if any
Request
1
curl https://docs-demo.btc.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{ "method": "getchaintips" }'
5
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free