Arbitrum One
Prêt à utiliser cela en production ?
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
Arbitrum One
Le niveau gratuit couvre les projets personnels. Le paiement à l'usage évolue sans carte bancaire.
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.| # | Nom | Type | Obligatoire | Description |
|---|---|---|---|---|
| 1 | blockCount | string | number | Oui | Number of blocks to include in the history window. Most providers cap this at 1024. |
| 2 | newestBlock | string | Oui | The most recent block to include in the window.Défaut : latest |
| 3 | rewardPercentiles | number[] | Non | Array of percentile values (0–100) at which to sample priority fees from each block. Pass an empty array to omit reward data. |
| Type | Description |
|---|---|
| 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.
| Code | Message | Cause |
|---|---|---|
-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.Paramètres
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.