Skip to main content

Get the base fee history

Returns the base fee history of the specified blockchain network for the previous 500 blocks.

The base fee is a part of the EIP-1559 upgrade to the Ethereum network, and it represents the minimum price a user must pay for their transaction to be included in a block.

This method can be useful for applications that need to display or analyze the historical base fee data for a specific blockchain network.

GET https://gas.api.infura.io/networks/${chainId}/baseFeeHistory

Parameters

Path:

  • chainId: string - ID of the chain to query

Returns

Array of historical base fees.

Example

Request

Include your API key and optional API key secret to authorize your account to use the APIs.

tip

You can call the API with only an API key, and include it as a path parameter instead of using the cURL authentication option (-u).

curl -X 'GET' \
-u <API_KEY>:<API_KEY_SECRET> \
"https://gas.api.infura.io/networks/1/baseFeeHistory"

Response

[
"14.585610312",
"16.407222984",
"16.687763116",
"16.357094117",
"15.82929799",
"15.21546789",
"17.113938208",
"16.92324819",
...
]