POST
/
788f110831fe13808302bd79796d55e8
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
}

The 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.

Get you own node endpoint today

Start for free and get your app to production levels immediately. No credit card required.

You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • 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:
    • 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

Response

  • result — 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.

Use case

The 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.

Body

application/json

Response

200 - application/json

The requested block statistics

The response is of type object.