An alert system which gives an alert message via Buzzer, SMS, Email and Telegram Bot whenever current bitcoin value has exceeded the specified threshold value.
Hardware Components:
- Bolt Wifi Module
- Buzzer
- LED
- Breadboard
- Jumper Wires
- Resistor (10kΩ)
Software apps & Online Services:
- Bolt Cloud
- Twilio SMS Messaging API
- Mailgun Email API
- Telegram API
- Ubuntu
Bitcoin lets us exchange money in a non traditional way and falls under the category of digital currency. The price of a bitcoin varies unpredictably and thus can increase or decrease in a short period of time.
This project lets one track the ever fluctuating bitcoin prices in the currency suitable to the user. There is no need to check the website time and again for bitcoin prices, as the user will be notified whenever there is an increase or decrease in the bitcoin market price with respect to the price specified by the user.
(a) Circuit
- The postive pins of buzzer is connected to pin 1 of the module and LED is connected to pin 0 of the module and their negative pins are connected to GND.
- The module is powered ON connected to the hotspot using Bolt App.
The stable blue and green LED's symbolises that the module has proper cloud access, is connected to the hotspot and has power supply.
(b) Code
- In the following block of code, I have imported important files like json for converting python dictionary to json strings, time to return the number of seconds passed since epoch and conf is the file containing private api keys and tokens.
- Now to fetch the data from Bolt Cloud, I have created an object called 'bolt' using which we can access the data on Bolt.
- For the Bolt Cloud to identify our device, we will need to provide the API key and the Device ID when creating the mybolt object. Since the conf file holds the API key and Device ID variables, we can use them as follows:
The below code will automatically fetch one's SID, Authentication TOKEN, TO_NUM and FROM_NUM that one have initialized in conf.py file.
- The inputs from the user:
- Below is the function definition to check the current market value of bitcoin and return it to the user.
- The main code block incorporates the function price_check and checks the condition whether the current bitcoin market value is greater than the selling price entered by the user and gives the different user alerts.
(I) Output Window
- Here, the user is asked to enter the corresponding country currency in which he/she wants to invest.
(II) Buzzer
(III) SMS
(IV) Email
(V) Telegram Bot