Links
Comment on page

Gas Fees

Ethereum Gas Fees API documentation
The /eth/v1/gasfees API returns an estimate of the next block gas fees in Gwei.
It determines this based on the calculated next block base fee and a linear regression prediction based on the last 5 blocks of fees.
get
https://data.spiceai.io
/eth/v1/gasfees
Get Gas Fee Estimates
The /eth/v1/gasfees?price=usd API returns an estimate of the next block gas fees in Gwei and the current price in the specified currency or token.
get
https://data.spiceai.io
/eth/v1/gasfees?price=usd
Get Gas Fee Estimates With Price
The /eth/v1/gasfees?period=1d API returns the historical gas used ratio and gas fees by block over the specified time period. If a period is not specified, it will default to 24 hours.
get
https://data.spiceai.io
/eth/v1/gasfees?period=1d
Get Historical Gas Used and Fees by Block
The /eth/v1/gasfees?period=1w&granularity=1d API returns the historical gas used ratio and gas fees by time granularity over the specified time period. If a period is not specified, it will default to 24 hours.
get
https://data.spiceai.io
/eth/v1/gasfees?period=7d&granularity=1d
Get Historical Gas Used and Fees by Time Granularity