dcr

Decred (DCR)

Method: POST getstakeversioninfo

dropdown
POST

getstakeversioninfo

Returns stake version statistics for one or more stake version intervals.

Parameters

count - numeric

Number of intervals to return.

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": "getstakeversioninfo",
"params": [3],
"id": "getblock.io"}'


Response

{
    "error": null,
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "currentheight": 590063,
        "hash": "000000000000000036d0fa5c8f9694b1eb6fa3458789430fe99b0d5bcabe55ed",
        "intervals": [
            {
                "endheight": 590063,
                "posversions": [
                    {
                        "count": 1328,
                        "version": 8
                    }
                ],
                "startheight": 588736,
                "voteversions": [
                    {
                        "count": 6,
                        "version": 7
                    },
                    {
                        "count": 6559,
                        "version": 8
                    }
                ]
            },
            {
                "endheight": 588736,
                "posversions": [
                    {
                        "count": 2016,
                        "version": 8
                    }
                ],
                "startheight": 586720,
                "voteversions": [
                    {
                        "count": 5,
                        "version": 7
                    },
                    {
                        "count": 9936,
                        "version": 8
                    }
                ]
            },
            {
                "endheight": 582688,
                "posversions": [
                    {
                        "count": 2016,
                        "version": 8
                    }
                ],
                "startheight": 580672,
                "voteversions": [
                    {
                        "count": 11,
                        "version": 7
                    },
                    {
                        "count": 9847,
                        "version": 8
                    }
                ]
            }
        ]
    }
}