dcr

Decred (DCR)

Method: POST txfeeinfo

dropdown
POST

txfeeinfo

Get various information about regular transaction fees from the mempool, blocks, and difficulty windows.

Parameters

block - numeric

The number of blocks to calculate transaction fees for, starting from the end of the tip moving backwards.

rangestart - numeric

Optional, the start height of the block range to calculate transaction fees for.

rangeend - numeric

Optional, the end height of the block range to calculate transaction fees for.

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


Response

{
    "error": null,
    "id": "getblock.io",
    "jsonrpc": "2.0",
    "result": {
        "feeinfoblocks": [
            {
                "height": 590071,
                "max": 0.00609655,
                "mean": 0.00110137,
                "median": 0.00010533,
                "min": 0.00010047,
                "number": 7,
                "stddev": 0.00223382
            },
            {
                "height": 590070,
                "max": 0.00010537,
                "mean": 0.00010408,
                "median": 0.00010521,
                "min": 0.00010166,
                "number": 3,
                "stddev": 2.1e-06
            },
            {
                "height": 590069,
                "max": 0.00010559,
                "mean": 0.0001021,
                "median": 0.00010094,
                "min": 0.00010068,
                "number": 7,
                "stddev": 2.2e-06
            }
        ],
        "feeinfomempool": {
            "max": 0.0002893,
            "mean": 0.00019513,
            "median": 0.00019513,
            "min": 0.00010097,
            "number": 2,
            "stddev": 0.00013317
        },
        "feeinforange": {
            "max": 0.03984063,
            "mean": 0.00078021,
            "median": 0.00010149,
            "min": 9.003e-05,
            "number": 1242,
            "stddev": 0.00388546
        }
    }
}