Estimate gas fees - Polygon Knowledge Layer (2024)

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

We received a lot of requests from dApp developers for building a gas price recommendation service. So we took some inspiration from Eth Gas Station and built one.

Polygon gas station has been deployed both on the Polygon mainnet & Amoy testnet. It queries the RPC for eth_feeHistory and fetches the 10th, 25th, and 50th percentiles of priority fees for transactions in each of the last 15 blocks. The average value of the 10th, 25th, and 50th percentiles become the safeLow, standard, and fast fee predictions.

Important

On Polygon PoS mainnet, it is mandatory to pass a minimum priority fees of 30 gwei.

Usage

Testnet

You can send GET requests using the following URLs to fetch gas price recommendations from the gas oracle:

Use the Amoy testnet below to get gas price recommendations:

cURL

curl https://gasstation.polygon.technology/amoy

JavaScript

fetch('https://gasstation.polygon.technology/amoy') .then(response => response.json()) .then(json => console.log(json))

Python

import requestsrequests.get('https://gasstation.polygon.technology/amoy').json()

Mainnet

You can send GET requests using the following URLs to fetch gas price recommendations from the gas oracle:

cURL

curl https://gasstation.polygon.technology/v2

JavaScript

fetch('https://gasstation.polygon.technology/v2') .then(response => response.json()) .then(json => console.log(json))

Python

import requestsrequests.get('https://gasstation.polygon.technology/v2').json()

Interpretation

An example JSON response will look like this:

{ "safeLow": { "maxPriorityFee":30.7611840636, "maxFee":30.7611840796 }, "standard": { "maxPriorityFee":32.146027800733336, "maxFee":32.14602781673334 }, "fast": { "maxPriorityFee":33.284344224133335, "maxFee":33.284344240133336 }, "estimatedBaseFee":1.6e-8, "blockTime":6, "blockNumber":24962816}
  • safelow, standard, fast, estimatedBaseFee are gas prices in GWei. You can use these prices before sending transaction off to Polygon, depending upon your needs.
  • blockNumber tells what was latest block mined when recommendation was made.
  • blockTime, in second, gives average block time of the network.
  • On Polygon PoS mainnet, it is mandatory to pass a minimum priority fees of 30 gwei.
Estimate gas fees - Polygon Knowledge Layer (2024)
Top Articles
Tesla has lost over $94B in market valuation so far in 2024, and Jeff Bezos is threatening to steal Elon Musk's crown as the world's richest person
Tenure Is a Total Scam
Places 5 Hours Away From Me
Craigslist Cars Augusta Ga
The Ivy Los Angeles Dress Code
7.2: Introduction to the Endocrine System
Computer Repair Tryon North Carolina
Bank Of America Appointments Near Me
Jefferson County Ky Pva
AB Solutions Portal | Login
Crazybowie_15 tit*
Truist Drive Through Hours
123Moviescloud
What Is A Good Estimate For 380 Of 60
Jasmine Put A Ring On It Age
Where Is George The Pet Collector
Like Some Annoyed Drivers Wsj Crossword
Seeking Arrangements Boston
Litter Robot 3 RED SOLID LIGHT
Del Amo Fashion Center Map
Prey For The Devil Showtimes Near Ontario Luxe Reel Theatre
Regina Perrow
Wood Chipper Rental Menards
Watson 853 White Oval
Afni Collections
3 Ways to Drive Employee Engagement with Recognition Programs | UKG
Jamielizzz Leaked
Happy Shuttle Cancun Review
Chadrad Swap Shop
Dentist That Accept Horizon Nj Health
Springfield.craigslist
Mumu Player Pokemon Go
Clearvue Eye Care Nyc
Culver's Hartland Flavor Of The Day
Mega Millions Lottery - Winning Numbers & Results
Worlds Hardest Game Tyrone
Chuze Fitness La Verne Reviews
Enjoy4Fun Uno
Danielle Ranslow Obituary
Emulating Web Browser in a Dedicated Intermediary Box
Other Places to Get Your Steps - Walk Cabarrus
Ezpawn Online Payment
Top 40 Minecraft mods to enhance your gaming experience
Pulaski County Ky Mugshots Busted Newspaper
Conan Exiles Tiger Cub Best Food
Wisconsin Volleyball titt*es
bot .com Project by super soph
Das schönste Comeback des Jahres: Warum die Vengaboys nie wieder gehen dürfen
Fresno Craglist
Otter Bustr
Latest Posts
Article information

Author: Terence Hammes MD

Last Updated:

Views: 6251

Rating: 4.9 / 5 (49 voted)

Reviews: 88% of readers found this page helpful

Author information

Name: Terence Hammes MD

Birthday: 1992-04-11

Address: Suite 408 9446 Mercy Mews, West Roxie, CT 04904

Phone: +50312511349175

Job: Product Consulting Liaison

Hobby: Jogging, Motor sports, Nordic skating, Jigsaw puzzles, Bird watching, Nordic skating, Sculpting

Introduction: My name is Terence Hammes MD, I am a inexpensive, energetic, jolly, faithful, cheerful, proud, rich person who loves writing and wants to share my knowledge and understanding with you.