Arbitrum One
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
Arbitrum One
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
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.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | blockCount | string | number | Sim | Number of blocks to include in the history window. Most providers cap this at 1024. |
| 2 | newestBlock | string | Sim | The most recent block to include in the window.Padrão: latest |
| 3 | rewardPercentiles | number[] | Não | Array of percentile values (0–100) at which to sample priority fees from each block. Pass an empty array to omit reward data. |
| Tipo | Descrição |
|---|---|
| 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 | Mensagem | 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.