chaintips

Provide details about every known tip in the block tree, including orphaned branches and the main chain.

Example Request and Result for chaintips method

In this section, we provide an illustrative example of a request made to retrieve details contents using the chaintips method. Additionally, we present the resulting response containing information about the tip in the block tree.

Parameters

  • none

The example in this section uses a non-existing project id.

Make sure you replace it with your Bitcoin mainnet or Bitcoin Testnet endpoint when issuing the API calls.

Don't have a project id? Here's a straightforward guide on how to obtain one!

Return information about all known tips in the block tree

POST https://bitcoin-mainnet.blastapi.io/<project-id>

Request Body

NameTypeDescription

jsonrpc*

string

1.0

id*

string

bwarelabs

method*

string

chaintips

params*

string

[]

{
    "result": [
        {
            "height": 830302,
            "hash": "00000000000000000000a5e1df81e463dcefa696a59f99ebf455dbc2febfecea",
            "branchlen": 0,
            "status": "active"
        },
        {
            "height": 829613,
            "hash": "0000000000000000000357088139cba6dc295875d7d3b2dd1fd764705727e451",
            "branchlen": 1,
            "status": "valid-fork"
        }
    ],
    "error": null,
    "id": "bwarelabs"
}

Curl Request example

curl --location 'https://bitcoin-mainnet.blastapi.io/<project-id>' \
--header 'Content-Type: application/json' \
--data '{
    "jsonrpc": "1.0",
    "id": "bwarelabs",
    "method": "getchaintips",
    "params": []
}'

Last updated