Attainu Project

Bitcoin Price Alert Project By Atanu Paul

Bitcoin Price Alert

Overview :

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.

Goals :

To fetch the current price of 1 Bitcoin in Indian Rupees, and send the notification through different apps.

Specifications :

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

  1. We’re going to use the popular automation website IFTTT
  2. We’re going to create 4 IFTTT applets and 1 Gmail service:
  3. 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.
  4. These will be triggered by our Python app which will consume the data from the Coinmarketcap API.
  5. An IFTTT applet is composed of two parts: a trigger and an action.
  6. The trigger will be a webhook service provided by IFTTT.
  7. 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.

Tools used:

  1. Vs code
  2. IFTTT bots
  3. Py installer

Python Libraries Used:

  1. requests
  2. Smptlib
  3. Time
  4. JSON
  5. Argparse
  6. Email.mime.multipart
  7. email.mime.text

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:

  1. Telegram [https://t.me/mybitcoinproject]
  2. Twitter [https://twitter.com/AtanuPa02151991]
  3. IFTTT mobile app
  4. Email
  5. SMS

 

Demo : 

 

Leave a Comment

Your email address will not be published.