getblockstats
Summary
Compute per block statistics for a given window. All amounts are in satoshis.
Description
Compute per block statistics for a given window. All amounts are in satoshis. It won't work for some heights with pruning.
Arguments
hash_or_height(NUM, required): The block hash or height of the target blockstats(ARR): Values to plot (see result below)height(STR): Selected statistictime(STR): Selected statistic
Results
value(OBJ): No description.avgfee(NUM, optional): Average fee in the blockavgfeerate(NUM, optional): Average feerate (in satoshis per virtual byte)avgtxsize(NUM, optional): Average transaction sizeblockhash(STR_HEX, optional): The block hash (to check for potential reorgs)feerate_percentiles(ARR_FIXED, optional): Feerates at the 10th, 25th, 50th, 75th, and 90th percentile weight unit (in satoshis per virtual byte)10th_percentile_feerate(NUM): The 10th percentile feerate25th_percentile_feerate(NUM): The 25th percentile feerate50th_percentile_feerate(NUM): The 50th percentile feerate75th_percentile_feerate(NUM): The 75th percentile feerate90th_percentile_feerate(NUM): The 90th percentile feerate
height(NUM, optional): The height of the blockins(NUM, optional): The number of inputs (excluding coinbase)maxfee(NUM, optional): Maximum fee in the blockmaxfeerate(NUM, optional): Maximum feerate (in satoshis per virtual byte)maxtxsize(NUM, optional): Maximum transaction sizemedianfee(NUM, optional): Truncated median fee in the blockmediantime(NUM, optional): The block median time pastmediantxsize(NUM, optional): Truncated median transaction sizeminfee(NUM, optional): Minimum fee in the blockminfeerate(NUM, optional): Minimum feerate (in satoshis per virtual byte)mintxsize(NUM, optional): Minimum transaction sizeouts(NUM, optional): The number of outputssubsidy(NUM, optional): The block subsidyswtotal_size(NUM, optional): Total size of all segwit transactionsswtotal_weight(NUM, optional): Total weight of all segwit transactionsswtxs(NUM, optional): The number of segwit transactionstime(NUM, optional): The block timetotal_out(NUM, optional): Total amount in all outputs (excluding coinbase and thus reward [ie subsidy + totalfee])total_size(NUM, optional): Total size of all non-coinbase transactionstotal_weight(NUM, optional): Total weight of all non-coinbase transactionstotalfee(NUM, optional): The fee totaltxs(NUM, optional): The number of transactions (including coinbase)utxo_increase(NUM, optional): The increase/decrease in the number of unspent outputs (not discounting op_return and similar)utxo_size_inc(NUM, optional): The increase/decrease in size for the utxo index (not discounting op_return and similar)utxo_increase_actual(NUM, optional): The increase/decrease in the number of unspent outputs, not counting unspendablesutxo_size_inc_actual(NUM, optional): The increase/decrease in size for the utxo index, not counting unspendables
Examples
qbit-cli getblockstats '"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"' '["minfeerate","avgfeerate"]'
qbit-cli getblockstats 1000 '["minfeerate","avgfeerate"]'
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "getblockstats", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09", ["minfeerate","avgfeerate"]]}' -H 'content-type: application/json' http://127.0.0.1:8352/
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "getblockstats", "params": [1000, ["minfeerate","avgfeerate"]]}' -H 'content-type: application/json' http://127.0.0.1:8352/