Skip to main content

Don't have an RPC Node yet?

Start using RPC Nodes in your project today.

Get your free RPC Node

eth_feeHistory

Get Fee History

POSThttps://site1.moralis-nodes.com/:chain/:apiKey

Retrieves historical data about transaction fees. The method returns the base fee per gas and reward (priority fee) ranges paid in each block for the requested block range. Useful for estimating appropriate fees for future transactions.

Note

Please refer to RPC schema page for more details on the RPC params and RPC response definitions of the RPC method.

PATH PARAMS
chainstringrequired
The blockchain to interact with.
apiKeystringrequired
Your API key for authentication.
BODY PARAM
Request Bodyobjectrequired
The request payload for retrieving fee history.
Responses
200Returns historical fee data for the requested block range.
400Bad Request
404Not Found
429Too Many Requests
500Internal Server Error
curl --request POST \
--url 'https://site1.moralis-nodes.com/eth/YOUR_API_KEY' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"jsonrpc": "2.0",
"id": 1,
"method": "eth_feeHistory"
}
'
Response Example
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"oldestBlock": "0x9cace7",
"baseFeePerGas": [
"0x4c4b40"
],
"gasUsedRatio": [
1.5
],
"reward": [
[
"0x34630b8a00"
]
]
}
}