⚠️Blast API (blastapi.io) ends Oct 31. Migrate to Dwellir and skip Alchemy's expensive compute units.
Switch Today →
Skip to main content

eth_feeHistory

Returns base fee per gas and gas used ratio for recent blocks.

Parameters

See Ethereum JSON-RPC spec for parameters of eth_feeHistory.

Examples

curl -s -X POST https://api-berachain-mainnet.n.dwellir.com/YOUR_API_KEY \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_feeHistory","params":[],"id":1}'

Response

  • Success: JSON object with result
  • Error: JSON object with error {"code": <number>, "message": <string>}