api/v2/feestats - Zcash

This endpoint returns fee statistics for the transactions in one block, including the average rate and the decile distribution.

Parameters

ParameterTypeLocationRequiredDescription
blockIdstringpathYesBlock height or block hash

Request

bashcurl --location --request GET 'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/feestats/3487790'

example.js

javascriptconst response = await fetch(
    'https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/feestats/3487790'
);
console.log(await response.json());

example.py

pythonimport requests

response = requests.get('https://shared.eu-central-1.getblock.io/<ACCESS-TOKEN>/api/v2/feestats/3487790')

print(response.json())

Response

json{
    "txCount": 19,
    "totalFeesSat": "1240422735",
    "averageFeePerKb": 10205992,
    "decilesFeePerKb": [
        13681,
        23344,
        41493,
        42130,
        47393,
        48309,
        106288,
        156774,
        403863,
        13058268,
        172148127
    ]
}

Response Parameters

FieldTypeDescription
txCountintegerNumber of transactions counted
totalFeesSatstringTotal fees across the counted transactions, in zatoshis
averageFeePerKbnumberAverage fee rate in zatoshis per kilobyte
decilesFeePerKbarrayEleven boundary values describing the fee-rate distribution

Treat these figures with caution on Zcash. They are computed from the normalized schema, which cannot see shielded value, so shielded transactions contribute a fee of zero. The block above holds 32 transactions but only 19 are counted.

Zcash does not price transactions by a fee market: ZIP-317 sets a conventional fee of 5,000 zatoshis per logical action, with a minimum of two actions. Size fees from that rule rather than from these statistics.

Use Cases

  • Fee Benchmarking: Compare a planned fee against recently confirmed transactions
  • Congestion Analysis: Track how fees move block to block

Error Handling

HTTP StatusMessageDescription
400Bad requestA path or query parameter is malformed
403ForbiddenMissing or invalid ACCESS-TOKEN
404Not foundNo indexed data exists for the request
500Internal errorThe indexer failed to process the request