Get notified when gas price is cheap ⛽️👍

Matías Caricato
4 min readJun 27, 2020

--

Last time we took a look at how to get notified through Telegram when a transaction from your wallet is completed. This time we’ll learn how to know when the gas price falls below the desired value.

Due to the increased adoption and on-chain activity, the Ethereum network has been highly congested since April, with an average price above 30 Gwei. A lot of time is being spent keeping an eye on ETH Gas Station, seeking for an opportunity to make our transactions without spending too much.

Ethereum Average Gas Price Chart

If we could get notified when the gas price is in this sweet spot we are looking for it would be amazing, right? Thanks to HAL and Chainlink we can do it! For the sake of simplicity, we’ll cover the steps needed to start receiving Telegram and Email notifications. That being said, bear in mind you can also get alerted through discord, slack, twitter, and even a webhook.

Let’s get started!

What do we need?

  • 5 minutes of your time
  • Telegram and/or an email account
  • An Ethereum Wallet (e.g. MetaMask)
  • A HAL account (you can sign up with GitHub or Google)

Email Notifications

First, we’ll create a trigger on HAL’s website that will send us an email when the gas price is below a certain value.

  1. Sign in to HAL’s website
  2. Click on “Chainlink” (for those being curious, Chainlink connects smart contracts to real-world data, events, and payments using oracle networks)

3. Click on “Track Gas Price” recipe

3. Once there, all we have to do is enter the threshold (e.g. 20)

4. Scroll down, click “Send an email” and complete the form below with your email address

5. Save your trigger and we are done!

Telegram Notifications

Now, we’ll create a new trigger that allows us to get notified through Telegram instead.

  1. Let’s open Telegram, start a conversation with the username@BotFather (Telegram Oficial Bot) to create a new bot
  2. Once done, just type in /newbot and follow the instructions (you can choose any username)
BotFather Telegram Oficial Bot

4. Save the token, we’ll use it later

5. Let’s create a new Telegram group where you will be getting the notifications

6. Invite the following users as members: @RawDataBot and the bot we’ve just created (@hal_notifications_bot in my case)

7. You will then get a message from @RowDataBot, copy and save the chat id from your new group (optional: you can remove this bot from your group now)

8. We have all the required data, head over to Hal’s website

9. We need to repeat the same 3 first steps from the previous tutorial but instead of “Send an email” we’ll click “Send using Telegram

10. Time to use the data we have saved, let’s enter the token and the chat id. Choose HTML as the message format and lastly, complete the name of your new trigger.

11. Once you are finished just click on “Create” and that’s it, we are done! 🥳 You will get a notification when the gas price matches your desired price ⛽️👍

You can follow me on Twitter https://twitter.com/mattiascaricato

--

--