JSON-RPCMethods

eth_feeHistory: parameters, returns and CU

Return historical base fees, gas usage ratios and fee percentiles.

Summary

Return historical base fees, gas usage ratios and optional priority-fee percentiles over a range of blocks.

Compute units (CU) and pricing

CU per call

10 CU

Price per 1M calls (USD)

$1.00

Parameters

ParameterTypeDescription
blockCountQUANTITYNumber of blocks to query, as a 0x-prefixed hexadecimal quantity.
newestBlockQUANTITY|TAGNewest block in the range, as a block number or tag such as latest.
rewardPercentilesARRAYOptional ascending array of percentiles between 0 and 100, used to compute priority-fee percentiles per block.

Returns

  • Type: object
  • Description: Object with oldestBlock, baseFeePerGas (an array one longer than blockCount), gasUsedRatio, and, when rewardPercentiles is given, a two-dimensional reward array.

Notes

This is the EIP-1559 fee-history method; when rewardPercentiles is omitted, the result has no reward field.

Request example

export BLOCKVECTRA_API_KEY=rgw_your_api_key

curl -X POST "https://api.blockvectra.com/v1/robinhood_mainnet" \
  -H 'Content-Type: application/json' \
  -H "x-api-key: $BLOCKVECTRA_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_feeHistory",
    "params": [
      "<blockCount>",
      "latest",
      []
    ],
    "id": 1
  }'

Supported chains

Available on all supported chains except: Rootstock (rootstock_mainnet).

Last updated: