bitcoind.app
CommandsGuidesContact ↗
Home/Blockchain/getblockstats
Blockchain

getblockstats

Compute per-block statistics for a given window. Useful for fee analysis and block metrics.

Parameters

hash_or_heightstring|numberREQUIRED
The block hash or height
statsarrayoptional
Specific stats to return. Default: all

Returns

objectBlock statistics including fees, sizes, weights, etc.

Code Examples

curl --user myuser --data-binary '{"jsonrpc":"1.0","id":"1","method":"getblockstats","params":[840000]}' -H 'content-type:text/plain;' http://127.0.0.1:8332/

Example Response

{
  "avgfee": 28453,
  "avgfeerate": 87,
  "avgtxsize": 587,
  "blockhash": "0000000000000000000...",
  "height": 840000,
  "ins": 8234,
  "outs": 9127,
  "totalfee": 81923450,
  "txs": 2876
}
← Previous
getblockheader
Next →
getchaintips

More Blockchain Commands

getbestblockhashgetblockgetblockchaininfogetblockcountgetblockfiltergetblockhash

bitcoind.app — Bitcoin Core RPC Reference

GuidesContact ↗