Polygon Gas Station

Polygon Gas Station aims to help dApp developers with gas price recommendations, so that they can use it before sending transaction off to Polygon network.

origin

At Polygon, we were receiving request from dApp developers for building a gas price recommendation service. So we took some inspiration from Eth Gas Station, and built one.

availability

Polygon Gas Station has been deployed both on Polygon Mumbai Testnet & Polygon Mainnet, where it analyzes recent 500 transactions and recommends gas price.

usage

Polygon-Mainnet

For getting gas price recommendation from this oracle, send GET request to https://gasstation-mainnet.matic.network

cURL

curl https://gasstation-mainnet.matic.network

JavaScript

fetch('https://gasstation-mainnet.matic.network')
.then(response => response.json())
.then(json => console.log(json))

Python

import requests
requests.get('https://gasstation-mainnet.matic.network').json()

interpretation

  • Example JSON response will look like this.
{
"safeLow": 1.0,
"standard": 9.0,
"fast": 29.0,
"fastest": 45.0,
"blockTime": 2,
"blockNumber": 2650006
}
  • {'safelow', 'standard', 'fast', 'fastest'} are gas prices in GWei, you can use these prices before sending transaction off to Polygon, depending upon your need
  • 'blockNumber' tells what was latest block mined when recommendation was made
  • 'blockTime' in second, which gives average block time of network
Last updated on