文档
定价GitHub控制台

Zcash

getblockstats8 额度

计算每个区块的统计数据(金额以 satoshi 计)

网络: zcash

参数

名称类型描述
hash_or_heightstring | number区块哈希或区块高度。
statsstring[]要返回的统计项名称,例如 avgfee、avgfeerate、height、ins、outs、subsidy、time、totalfee、txs。默认为所有值。 (可选)

返回值

类型

Object

每个区块的统计数据,金额以 satoshi 计,费率以 sat/vB 计: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。给定 stats 时只包含所请求的统计项。

代码示例

curl https://holy-burned-sky-zcash-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7 \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getblockstats",
  "params": [
    100000,
    [
      "avgfee",
      "height",
      "totalfee",
      "txs"
    ]
  ]
}'