POSTgetblockstats

Bitcoin Mainnethttps://bitcoin-mainnet.nodit.io/

Computes the fee and size statistics for the block with the given block hash or height. Pass an array of value names in stats to return only the requested values.

Request Body
idintegerrequired
jsonrpcstringrequired
methodstringrequired
paramsoneOf[]required

It contains following parameters in order:

  1. hash_or_height: The block hash or height of the target block. (required)
  2. stats: The names of the values to return, as an array of strings. (optional, all values are returned when omitted)
params[0]string

The block hash or height of the target block. A height is passed as an integer.

params[1]string[]

The names of the values to return. All values are returned when omitted.

Responses
avgfeeinteger

The average fee in the block, in satoshis.

avgfeerateinteger

The average fee rate in the block, in satoshis per virtual byte.

avgtxsizeinteger

The average transaction size in the block, in bytes.

blockhashstring

The hash of the block the statistics were computed for. Use it to check for potential reorgs.

feerate_percentilesinteger[]

Fee rates at the 10th, 25th, 50th, 75th and 90th percentile, in satoshis per virtual byte.

heightinteger

The block height.

insinteger

The number of inputs in the block, excluding the coinbase input.

maxfeeinteger

The maximum fee in the block, in satoshis.

maxfeerateinteger

The maximum fee rate in the block, in satoshis per virtual byte.

maxtxsizeinteger

The maximum transaction size in the block, in bytes.

medianfeeinteger

The truncated median fee in the block, in satoshis.

mediantimeinteger

The median time past of the block, expressed in UNIX epoch time.

mediantxsizeinteger

The truncated median transaction size in the block, in bytes.

minfeeinteger

The minimum fee in the block, in satoshis.

minfeerateinteger

The minimum fee rate in the block, in satoshis per virtual byte.

mintxsizeinteger

The minimum transaction size in the block, in bytes.

outsinteger

The number of outputs in the block.

subsidyinteger

The block subsidy, in satoshis.

swtotal_sizeinteger

The total size of all segwit transactions, in bytes.

swtotal_weightinteger

The total weight of all segwit transactions.

swtxsinteger

The number of segwit transactions.

timeinteger

The block time expressed in UNIX epoch time.

total_outinteger

The total amount in all outputs, excluding the coinbase, in satoshis.

total_sizeinteger

The total size of all non-coinbase transactions, in bytes.

total_weightinteger

The total weight of all non-coinbase transactions.

totalfeeinteger

The total fee in the block, in satoshis.

txsinteger

The number of transactions in the block, including the coinbase.

utxo_increaseinteger

The increase or decrease in the number of unspent outputs (UTXOs).

utxo_size_incinteger

The increase or decrease in the size of the UTXO index, in bytes.

utxo_increase_actualinteger

The increase or decrease in the number of unspent outputs (UTXOs), not counting unspendables.

utxo_size_inc_actualinteger

The increase or decrease in the size of the UTXO index, not counting unspendables, in bytes.

X-API-KEY
RequestCU50
cURL
curl -X POST "https://bitcoin-mainnet.nodit.io/" \
  -H "X-API-KEY: {YOUR_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "getblockstats",
  "params": [
    820000,
    [
      "minfeerate",
      "avgfeerate"
    ]
  ]
}'
Response
Example · 200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "minfeerate": 3,
    "avgfeerate": 27
  }
}