Bitcoin Price Alert
Bitcoin, the world‟s most common and well-known cryptocurrency has been increasing in popularity. It has the same basic structure as it did when created in 2008, but repeat instances of the world market-changing have created a new demand for cryptocurrencies much greater than its initial showing. By using a cryptocurrency, users are able to exchange value digitally without third party oversight
In this project, I made a program to get the latest bitcoin price. The general process is to run the code and then it’ll fetch the data from a cryptocurrency API called coinmarketcap and then it’ll show the updated price in a public/private telegram channel. For that, I have used Python and a third-party service called IFTTT.
To fetch the current price of 1 Bitcoin in Indian Rupees, and send the notification through different apps.
Bitcoin price is a fickle thing. You never really know where it’s going to be at the end of the day. So, instead of constantly checking various sites for the latest updates, let’s make a Python app to do the work for you
- We’re going to use the popular automation website IFTTT
- We’re going to create 4 IFTTT applets and 1 Gmail service:
- One for emergency notification when Bitcoin price falls under a certain threshold and the emergency notification plus normal price update will send to any app of the users choice out of the 5 option.
- These will be triggered by our Python app which will consume the data from the Coinmarketcap API.
- An IFTTT applet is composed of two parts: a trigger and an action.
- The trigger will be a webhook service provided by IFTTT.
- Our Python app will make an HTTP request to the webhook URL which will trigger an action. Now, this is the fun part—the action could be almost anything you want. IFTTT offers a multitude of actions like sending an email, updating a Google Spreadsheet and even calling your phone
What is IFTTT?
If This Then That, also known as IFTTT is a freeware web-based service that creates chains of simple conditional statements, called applets.An applet is triggered by changes that occur within other web services such as Gmail, Facebook, Telegram, Instagram, or Pinterest.
- Vs code
- IFTTT bots
- Py installer
Python Libraries Used:
Note: number 2,6,7 are used to set up email sending. Number 1 is used for sending and receiving HTTP requests from a python app. Number 3 is to fetch current time and number 4 is to change the received data in JSON format. Number 7 is used to make a command-line tool.
Applications this app can send notifications to:
- Telegram [https://t.me/mybitcoinproject]
- Twitter [https://twitter.com/AtanuPa02151991]
- IFTTT mobile app