dcr

Decred (DCR)

Method: POST getstakeversions

dropdown
POST

getstakeversions

Returns the stake versions statistics.

Parameters

hash - string

The start block hash.

count - numeric

The number of blocks that will be returned.

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": "getstakeversions",
"params": ["000000000000000015cf0d0da939e61d0cd7a37443a99c726ecc9cbbd61b047f", 2],
"id": "getblock.io"}'


Response

{
    "error": null,
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "stakeversions": [
            {
                "blockversion": 8,
                "hash": "000000000000000015cf0d0da939e61d0cd7a37443a99c726ecc9cbbd61b047f",
                "height": 589761,
                "stakeversion": 8,
                "votes": [
                    {
                        "bits": 5,
                        "version": 8
                    },
                    {
                        "bits": 5,
                        "version": 8
                    },
                    {
                        "bits": 1,
                        "version": 8
                    },
                    {
                        "bits": 5,
                        "version": 8
                    },
                    {
                        "bits": 1,
                        "version": 8
                    }
                ]
            },
            {
                "blockversion": 8,
                "hash": "00000000000000001997f485505c14e33c2f6279e81bdbb27ffce3560800465c",
                "height": 589760,
                "stakeversion": 8,
                "votes": [
                    {
                        "bits": 1,
                        "version": 8
                    },
                    {
                        "bits": 5,
                        "version": 8
                    },
                    {
                        "bits": 5,
                        "version": 8
                    },
                    {
                        "bits": 5,
                        "version": 8
                    },
                    {
                        "bits": 5,
                        "version": 8
                    }
                ]
            }
        ]
    }
}