Ethereum icon

Ethereum

Interact with Ethereum blockchain

Gas → Get Fee History

AI-generated

Summary

Fetch fee history for the last N blocks

Inputs

  • blockCount (required) — Number of blocks to include in the fee history
  • rewardPercentiles — Array of reward percentiles to request

Output shape

array of fee history objects

Each object contains baseFeePerGas, priorityFeePerGas, and requested reward percentiles; may contain fewer entries than blockCount if not enough data

Examples

Example 1: Get fee history for the most recent 5 blocks

blockCount: 5, rewardPercentiles: [25,50,75]

Example 2: Use default block count with custom percentiles

blockCount: 4, rewardPercentiles: [10,90]

Links

Discussion