pythonethereumweb-scriptingweb3py

Get Updated Gas Price from EthGas Station in be used in a python application


Is there any way to know the updated Gas Price from EthGasStation to be used in python. I want to regularly know the average transaction confirmation time by gas price before send a transaction to the blockchain.

I have done a quick search and find that I can use web scripting with python to retrieve the data I want from the website, but what I don't know how I can get data from figures because the confirmation time is represented as figures in the website. Is there any other website give me the transaction confirmation time by gas price as a raw data, so I can get it and use it in my python application?

Thanks in advance


Solution

  • I am not sure if this is what you're looking for, but here are 2 possible solutions I have found.

    1. There is a free API that allows 5 requests per second. https://etherscan.io/apis#gastracker

    2. You can use Selenium to load the following page, input your data, and scrape the details accordingly. https://ethgasstation.info/calculatorTxV.php