curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "1.0",
"method": "getblockstats",
"params": [
"00000000000000000002d517d73d1abd09730ea69aa688207c281944300e8a50",
[
"avgfee",
"avgfeerate",
"avgtxsize",
"blockhash",
"feerate_percentiles",
"height",
"ins",
"maxfee",
"maxfeerate",
"maxtxsize",
"medianfee",
"mediantime",
"mediantxsize",
"minfee",
"minfeerate",
"mintxsize",
"outs",
"subsidy",
"swtotal_size",
"swtotal_weight",
"swtxs",
"time",
"total_out",
"total_size",
"total_weight",
"totalfee",
"txs",
"utxo_increase",
"utxo_size_inc"
]
],
"id": 1
}
'{
"result": {},
"error": {},
"id": 123
}curl --request POST \
--url https://nd-202-842-353.p2pify.com/788f110831fe13808302bd79796d55e8 \
--header 'Content-Type: application/json' \
--data '
{
"jsonrpc": "1.0",
"method": "getblockstats",
"params": [
"00000000000000000002d517d73d1abd09730ea69aa688207c281944300e8a50",
[
"avgfee",
"avgfeerate",
"avgtxsize",
"blockhash",
"feerate_percentiles",
"height",
"ins",
"maxfee",
"maxfeerate",
"maxtxsize",
"medianfee",
"mediantime",
"mediantxsize",
"minfee",
"minfeerate",
"mintxsize",
"outs",
"subsidy",
"swtotal_size",
"swtotal_weight",
"swtxs",
"time",
"total_out",
"total_size",
"total_weight",
"totalfee",
"txs",
"utxo_increase",
"utxo_size_inc"
]
],
"id": 1
}
'{
"result": {},
"error": {},
"id": 123
}getblockstats method computes per block statistics based on the specified block hash and the array of stats to include. It returns an object containing various statistics for the specified block.
blockhash (required) — the hash of the block for which statistics are to be computed.stats (optional) — an array of statistics to include in the response. Possible values include:
avgfeeavgfeerateavgtxsizeblockhashfeerate_percentilesheightinsmaxfeemaxfeeratemaxtxsizemedianfeemediantimemediantxsizeminfeeminfeeratemintxsizeoutssubsidyswtotal_sizeswtotal_weightswtxstimetotal_outtotal_sizetotal_weighttotalfeetxsutxo_increaseutxo_size_incresult — an object containing the computed block statistics based on the specified parameters.error — an object containing an error message if an error occurred.id — an integer representing the ID of the request, used to match requests with responses.getblockstats method is useful for analyzing and extracting detailed statistics about individual blocks in the blockchain. These statistics can provide valuable insights into block characteristics and transaction data, aiding in blockchain analysis and monitoring.Was this page helpful?