Skip to main content
GET
/
v2
/
api
curl "https://api.etherscan.io/v2/api?chainid=1&module=stats&action=dailyavggasprice&startdate=2019-02-01&enddate=2019-02-28&sort=desc&apikey=YourApiKeyToken"
{
  "status": "1",
  "message": "OK",
  "result": [
    {
      "UTCDate": "2019-02-01",
      "unixTimeStamp": "1548979200",
      "maxGasPrice_Wei": "60814303896257",
      "minGasPrice_Wei": "432495",
      "avgGasPrice_Wei": "13234562600"
    },
    {
      "UTCDate": "2019-02-02",
      "unixTimeStamp": "1549065600",
      "maxGasPrice_Wei": "20000000000000",
      "minGasPrice_Wei": "2352",
      "avgGasPrice_Wei": "12000569516"
    }
  ]
}
This is a PRO endpoint, available to any paid tier

Query Parameters

apikey
string
default:"YourApiKeyToken"
Your Etherscan API key.
chainid
string
default:"1"
Chain ID to query, eg 1 for Ethereum, 8453 for Base from our supported chains.
module
string
default:"stats"
Set to stats for this endpoint.
action
string
default:"dailyavggasprice"
Set to dailyavggasprice for this endpoint.
startdate
string
default:"2019-02-01"
Starting date in yyyy-MM-dd format.
enddate
string
default:"2019-02-28"
Ending date in yyyy-MM-dd format.
sort
string
default:"desc"
Sort order either desc for the latest results first or asc for the oldest results first.
curl "https://api.etherscan.io/v2/api?chainid=1&module=stats&action=dailyavggasprice&startdate=2019-02-01&enddate=2019-02-28&sort=desc&apikey=YourApiKeyToken"
{
  "status": "1",
  "message": "OK",
  "result": [
    {
      "UTCDate": "2019-02-01",
      "unixTimeStamp": "1548979200",
      "maxGasPrice_Wei": "60814303896257",
      "minGasPrice_Wei": "432495",
      "avgGasPrice_Wei": "13234562600"
    },
    {
      "UTCDate": "2019-02-02",
      "unixTimeStamp": "1549065600",
      "maxGasPrice_Wei": "20000000000000",
      "minGasPrice_Wei": "2352",
      "avgGasPrice_Wei": "12000569516"
    }
  ]
}
I