dcr

Decred (DCR)

Method: POST gettreasuryspendvotes

dropdown
POST

gettreasuryspendvotes

Returns a tally of on-chain votes for treasury spend transactions.

Parameters

blockhash - string

Optional.

Count treasury spend votes up to this block. If unspecified, the current chain tip is used.

tspends - json array

Optional.

A list of treasury spend transaction hashes for which to tally votes. All specified hashes must correspond to either mined or mempool residing tspends. If unspecified, defaults to tallying votes for all tspends currently in the mempool.

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


Response

{
    "error": null,
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "hash": "000000000000000015cf0d0da939e61d0cd7a37443a99c726ecc9cbbd61b047f",
        "height": 589761,
        "votes": []
    }
}