Arbitrum One
¿Listo para usar esto en producción?
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
Arbitrum One
El plan gratuito cubre proyectos personales. El pago por uso escala sin necesidad de tarjeta.
eth_feeHistory returns historical base fees, gas-used ratios, and priority-fee percentiles for a range of recent Arbitrum One blocks. On this ETH-gas Optimistic Rollup it is the foundation for building EIP-1559 fee strategies: you read the recent base-fee trend and percentile priority fees, then pick a maxFeePerGas and maxPriorityFeePerGas for your next transaction. Query the window from https://arbitrum.therpc.io/YOUR_API_KEY (chain ID 42161).
maxFeePerGas and maxPriorityFeePerGas from recent percentile data for Arbitrum One transactions.gasUsedRatio over a rolling block window.| # | Nombre | Tipo | Requerido | Descripción |
|---|---|---|---|---|
| 1 | blockCount | string | number | Sí | Number of blocks to include in the history window. Most providers cap this at 1024. |
| 2 | newestBlock | string | Sí | The most recent block to include in the window.Predeterminado: latest |
| 3 | rewardPercentiles | number[] | No | Array of percentile values (0–100) at which to sample priority fees from each block. Pass an empty array to omit reward data. |
| Tipo | Descripción |
|---|---|
| object | Object with: `oldestBlock` (hex, starting block of the window), `baseFeePerGas` (array of hex wei — one per block plus the next predicted value), `gasUsedRatio` (array of floats 0–1 per block), `reward` (array of arrays — per-block percentile priority fees in hex wei; only present when `rewardPercen |
Try it live in the Arbitrum One playground.
| Código | Mensaje | Causa |
|---|---|---|
-32602 | invalid argument | blockCount is 0, out of range, or rewardPercentiles contains values outside 0–100. |
-32000 | block not found | `newestBlock` references a block that does not exist on this node. |
baseFeePerGas is the node's prediction for the next block, not a confirmed value — drop it when averaging historical fees.blockCount values produce very large responses; cap at roughly 100–200 blocks per call and paginate for longer windows.Parámetros
Hex or decimal integer, e.g. "0xa" or 10
"latest" | "safe" | "finalized" | hex block number
Array of percentile values (0–100) at which to sample priority fees from each block. Pass an empty array to omit reward data.