dcr

Decred (DCR)

Method: POST gettreasurybalance

dropdown
POST

gettreasurybalance

Returns the matured balance of the network's treasury account. It optionally also returns the individual balance-changing amounts (treasury base, add and spend transactions) for the block.

Parameters

hash - string

Optional.

Return the treasury balance at the specified block. If unspecified, return the balance for the current tip block.

verbose - boolean

Optional.

Whether to fill the updates field of the response. Defaults to false.

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


Response

{
    "error": null,
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "balance": 4609117876238,
        "hash": "000000000000000015cf0d0da939e61d0cd7a37443a99c726ecc9cbbd61b047f",
        "height": 589761
    }
}