Compute per-block statistics for a given window. Useful for fee analysis and block metrics.
hash_or_heightstring|numberREQUIREDstatsarrayoptionalcurl --user myuser --data-binary '{"jsonrpc":"1.0","id":"1","method":"getblockstats","params":[840000]}' -H 'content-type:text/plain;' http://127.0.0.1:8332/{
"avgfee": 28453,
"avgfeerate": 87,
"avgtxsize": 587,
"blockhash": "0000000000000000000...",
"height": 840000,
"ins": 8234,
"outs": 9127,
"totalfee": 81923450,
"txs": 2876
}