Access gas price data from http://ethgasstation.info
GET Requesthttps://ethgasstation.info/json/ethgasAPI.json
Returns the fast, standard and safelow prices, along with the current block.
Params: no params
Response Object Details:
fast: Recommended fast(expected to be mined in < 2 minutes) gas price in x10 Gwei(divite by 10 to convert it to gwei)fastest: Recommended fastest(expected to be mined in < 30 seconds) gas price in x10 Gwei(divite by 10 to convert it to gwei)safeLow: Recommended safe(expected to be mined in < 30 minutes) gas price in x10 Gwei(divite by 10 to convert it to gwei)average: Recommended average(expected to be mined in < 5 minutes) gas price in x10 Gwei(divite by 10 to convert it to gwei)block_time: Average time(in seconds) to mine one single blockblockNum: Latest block numberspeed: Smallest value of (gasUsed / gaslimit) from last 10 blockssafeLowWait: Waiting time(in minutes) for safeLow gas priceavgWait: Waiting time(in minutes) for average gas pricefastWait: Waiting time(in minutes) for fast gas pricefastestWait: Waiting time(in minutes) for fastest gas price
Note: To convert the provided values to gwei, divide by 10
Sample Response Object:
{"fast":50.0,"fastest":200.0,"safeLow":10.0,"average":20.0,"block_time":13.942307692307692,"blockNum":7403346,"speed":0.7090284960673774,"safeLowWait":13.4,"avgWait":1.8,"fastWait":0.5,"fastestWait":0.5}
GET Requesthttps://ethgasstation.info/json/predictTable.json
Returns estimate confirmation times for a range of gas prices from the EGS Prediction Page
[{"gasprice":0.1,"hashpower_accepting":0.0,"hashpower_accepting2":0.0,"tx_atabove":231.0,"age":4.0,"pct_remaining5m":0.0,"pct_mined_5m":0.0,"total_seen_5m":3.0,"average":300,"safelow":100,"nomine":null,"avgdiff":0,"intercept":4.8015,"hpa_coef":-0.0243,"avgdiff_coef":-1.6459,"tx_atabove_coef":0.0006,"int2":6.9238,"hpa_coef2":-0.067,"sum":6.9238,"expectedWait":1000.0,"unsafe":1,"expectedTime":135.29},.......]