api/v2/feestats - Litecoin

This endpoint returns fee statistics for the transactions contained 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/3179800'

example.js

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

example.py

pythonimport requests

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

print(response.json())

Response

json{
    "txCount": 59,
    "totalFeesSat": "73004",
    "averageFeePerKb": 7175,
    "decilesFeePerKb": [
        0,
        1000,
        1000,
        1062,
        3000,
        3000,
        3000,
        5000,
        7000,
        10014,
        159836
    ]
}

Response Parameters

FieldTypeDescription
txCountintegerNumber of transactions counted, excluding the coinbase
totalFeesSatstringTotal fees paid in the block, in litoshis
averageFeePerKbnumberAverage fee rate in litoshis per kilobyte
decilesFeePerKbarrayEleven boundary values describing the fee-rate distribution, from minimum to maximum

decilesFeePerKb holds eleven entries, the ten decile boundaries plus the maximum. A leading 0 is normal and reflects zero-fee transactions in the block. The spread is often wide, so the average alone is a poor guide to what a transaction needs to pay.

Use Cases

  • Fee Benchmarking: Compare a planned fee against what recently confirmed
  • Congestion Analysis: Track how rates move block to block
  • Rate Cards: Derive economy and priority tiers from the decile spread

Error Handling

HTTP StatusMessageDescription
400Bad requestThe block id is not a valid height or hash
403ForbiddenMissing or invalid ACCESS-TOKEN
404Not foundNo block matches the requested id
500Internal errorThe indexer failed to compute fee statistics