About Project :
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 reated in 2008, but repeat instances of the world market changing has 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 latest bitcoin price. The general process is to run the code and then it'll fetch the data from a cryptocurrency API called of web https://api.coindesk.com and then it'll show updated price in a public/private telegram channel and on My personal twitter account. For that i have used Python and a third party service called IFTTT to send the push notification.
How Program Works:
- Now coming to the python console. We have to create two separate function to fetch the price and to update that in our telegram channel and twitter account.
- For that in run function we took two separate function used first one is for fetch and second is for send notification .
- While getting the data from 'price()' under run function we are returning the value
- through 'twitter_notifier and twitter_notifier' applet which is triggering the Webhook notification by send_data function.
- And lastly the time sleep function imported from datetime package will take care of the current time and the time when we need the data.
- The only thing missing is the format_bitcoin_history function. It takes the bitcoin_history as an argument and formats it using some of the basic HTML tags allowed by Telegram, like <br>, <b>, <i>, and so on.
Command line utility:
1. For command line utility we imported a package called argparse.
2. Where we added three argument, one for the interval we want and other two for lower and upper limit.
3. For each we gave default value which will be called if we failed to give any argument.
4. here threee 'add_argument' function are taking the values and at last we are passing all arguments in a send_data function.
5. So when run function is being called we are calling two different function 'send_data()" for the notification and 'price()' for fetch the price form API.