dcr

Decred (DCR)

Method: POST ticketvwap

dropdown
POST

ticketvwap

Calculate the volume weighted average price of tickets for a range of blocks (default: full PoS difficulty adjustment depth).

Parameters

stop - numeric

The start height to begin calculating the VWAP from.

end - numeric

The end height to begin calculating the VWAP from.

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


Response

{
    "error": null,
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": 193.4765256
}