dcr

Decred (DCR)

Method: POST getchaintips

dropdown
POST

getchaintips

Returns about all known chain tips the in the block tree.

The statuses in the result have the following meanings: - active: The current best chain tip. - invalid: The block or one of its ancestors is invalid. - headers-only: The block or one of its ancestors does not have the full block data available which also means the block can't be validated or connected. - valid-fork: The block is fully validated which implies it was probably part of the main chain at one point and was reorganized. - valid-headers: The full block data is available and the header is valid, but the block was never validated which implies it was probably never part of the main chain.

Parameters

-

Request

curl --location --request POST 'https://dcr.getblock.io/mainnet/' 
--header 'x-api-key: YOUR-API-KEY' 
--header 'Content-Type: application/json' 
--data-raw '{"jsonrpc": "2.0",
"method": "getchaintips",
"params": [],
"id": "getblock.io"}'


Response

{
    "error": null,
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": [
        {
            "branchlen": 0,
            "hash": "000000000000000012f525769a1a492c7c2261ee20b862b8c8374d860a2a95bc",
            "height": 590054,
            "status": "active"
        },
        {
            "branchlen": 1,
            "hash": "00000000000000002549b016e0b826f1747fbf79d57aec346690b3ef30084304",
            "height": 590053,
            "status": "valid-headers"
        },
        {
            "branchlen": 1,
            "hash": "000000000000000000f9dd8eb117e9b7188228c334cef8d4c3e03797496fbf55",
            "height": 590036,
            "status": "valid-headers"
        },
        {
            "branchlen": 1,
            "hash": "000000000000000025b2969e49f46406bdcb1e25f9d2b9f498ee5d2df56c1c6f",
            "height": 590027,
            "status": "valid-headers"
        },
        {
            "branchlen": 1,
            "hash": "000000000000000022e8bc7bad221349ebe8f8424b18fd58695eb75c9354e0df",
            "height": 589997,
            "status": "valid-headers"
        },
        {
            "branchlen": 1,
            "hash": "00000000000000001e7b30609f9a308d73b3d256eb2962b4284d583945e4a62c",
            "height": 589987,
            "status": "valid-headers"
        }
    ]
}