getblockstats | Bitcoin

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.

Try the getblockstats RPC method yourself

Language
Click Try It! to start a request and see the response here!