Skip to main content

getblockstats RPC Method

Calculates per block statistics for a given window.

Updated on
Oct 4, 2023

getblockstats RPC Method

Parameters

hash_or_height
string/numeric
REQUIRED
The block hash or height of the target block
stats
JSON Array
JSON array of values to filter from

Returns

avgfee
Average fee in the block
avgfeerate
Average fee rate
avgtxsize
Average transaction size
blockhash
The hash of the block
feerate_percentiles
A JSON array containing Feerates at the 10th, 25th, 50th, 75th, and 90th percentile weight unit
height
The height of the block
ins
The number of inputs
maxfee
Maximum fee in the block
maxfeerate
Maximum feerate in the block
maxtxsize
Maximum transaction size in the block
medianfee
Truncated median fee in the block
mediantime
The block median time past
mediantxsize
Truncated median transaction size
minfee
Minimum fee in the block
minfeerate
Minimum feerate in the block
mintxsize
Minimum transaction size
outs
The number of outputs
subsidy
The block subsidy
swtotal_size
Total size of all segwit transactions
swtotal_weight
Total weight of all segwit transactions
swtxs
The number of segwit transactions
time
The block time
total_out
Total amount in all outputs (excluding coinbase thus reward [i.e subsidy + totalfee])
total_size
Total size of all non-coinbase transactions
total_weight
Total weight of all non-coinbase transactions
totalfee
The fee total
txs
The number of transactions
utxo_increase
The increase/decrease in the number of unspent outputs
utxo_size_inc
The increase/decrease in size for the utxo index
Request
1
curl https://docs-demo.btc.quiknode.pro/ \
2
-X POST \
3
-H "Content-Type: application/json" \
4
--data '{"method": "getblockstats", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09", ["minfeerate","avgfeerate"]]}'
5
Don't have an account yet?
Create your QuickNode endpoint in seconds and start building
Get started for free