To run this program first clone the directory and run the commands in terminal
pip install -r 'requrirements.txt'
Once the required packages are installed, we need to create accounts (FREE) at Coinmarketcap and IFTTT to get the api keys.
To create webhooks: follow the steps
Once you haved logged into IFTTT website:
To create a new test applet follow these steps:
-
Click on the big “this” button
-
Search for the “webhooks” service and select the “Receive a web request” trigger
-
Let’s name the event
bitcoin_price_emergency
-
Now select the big “that” button
-
Search for the “notifications” service and select the “Send a rich notification from the IFTTT app” action
-
Give it a title, like “Bitcoin price emergency!”
-
Set the message to Bitcoin price is at ${{Value1}}. Buy or sell now!
Create the action and finish setting up the applet
To recieve notifications on your phone you also need to install IFTTT application and login with the same e-mail you created the IFTTT account.
Now the we have our API keys, lets finish this up quickly
touch .env
Inside .env
file, enter the api keys
export API_KEY={coinmarketcap-api}
export IFTTT_KEY={IFTTT-api}
and save (ofcourse).
Also, in
crypto_price.py
, you might want to updatae
And then finally,
run
pyhton3 crypto_price.py
Thats it!!
If stuck somewhere, feel free to ping me!