Code Monkey home page Code Monkey logo

crypto_notifier's Introduction

Crypto_notifier

Planning doc

Google Slides Presentation

The goal of this application is to deliver a comparison for user-chosen cryptocurrencies through a text message using the Twilio software package. The comparison is taking the historical return values of the currencies chosen and creating a threshold value which is used to compare daily return values of recent times.


Required Installs

Language: Python 3.9.12

Libraries used:

Pandas - For the creation and manipulation of Data Frames

Jupyter Labs - An ipython kernel for interactive computing in python

OS - Miscellaneous operating system interface

Dotenv - Module to load environment variables

Questionary - Python module for easy CLI interaction

Coin Gecko API - A free comprehensive cryptocurrency API

Twilio - API for sending SMS to a phone number after setting up an account


Installation Guide

This application has quite a few working parts and it is necessary to ensure that all the correct packages have been installed correctly.

Firstly, we recommend using setting up an Anaconda environment to run this application. Additionally, all commands are going to be assuming GitBash is being used as the terminal and conda has been intialized. You can download Anaconda and Git Bash here: anaconda_link, git_bash

To create the right conda environment through Git Bash enter

    conda create -n myenv python=3.9
    conda activate myenv

First check that all of the anaconda associated packages have been installed by running:

    conda list jupyter
    conda list pandas

Next the packages not included need to be installed and this can be accomplished by entering the following in the Git Bash terminal.

    pip install questionary
    pip install python-dotenv
    pip install -U pycoingecko
    pip install twilio

To check that all of the dependencies have been installed by entering the following into the Git Bash Terminal:

    conda list questionary
    conda list dotenv
    conda list pycoingecko
    conda list twilio

With all of these packages the conda environment should be set up to run the Crypto Notifier application


Usage

Prior to running the application it is necessary to create a Twilio Account. Sign up at https://www.twilio.com/

There are 3 important pieces of information that need to be retrieved: the Twilio phone number associated with your account, the Twilio account ID and the Twilio authentication token.

You can find this informatin on the main console page of your twilio account:

twilio

These peices of information need to be stored in a .env file that is saved in the same repo as this application. The information needs to look like the following:

"TWILIO_ACCOUNT_ID" = 'YOUR ACCOUNT ID HERE'

"TWILIO_AUTH_TOKEN" = 'YOUR AUTHENTICATION TOKEN HERE'

"TWILIO_PHONE_NUMBER" = 'YOUR TWILIO PHONE NUMBER HERE'

Once the .env file has been created with an active Twilio phone number and credentials everything should be set up to run the application.

To run the application first activate the conda environment associated with the necessary packages and libraries. Navigate to this application's folder repo and run the application with the following commands:

    conda activate myenv
    cd Crypto_notifer
    code .

It is advised to run this application in VS Code or another IDE as running it through the command line has shown to give issues with recognizing the environment variables.

One the program is running:

This will prompt the user to enter their 10 digit phone number:

prompt

After entering a phone number the user will be given a choice of 5 crypto currencies to choose from

choices

To select multiple cryptocurrencies for analysis the user must use the SPACE bar to highlight multiple currencies then press ENTER to advance through the program.

The final display will show:

message_sent

You should receive a text message like the following:

text_message


Highlights:

Data Analysis

First we called the data for each individual cyrptocurrency: below is an example for one symbol.

ripple

Next we gathered the pct change and then took the absolute value to reflect the magnitude of the change:

ripple_mag

Then we calculated the mean of pct change over the entire 18 months. This is the threshold for each coin.

ripple_threshold

Finally we put all of the values in a combined dataframe for referencing during our comparisons:

final

The final thing we had to do was create a concatenated dataframe with two weeks of the most recent cryptocurrency data for the list given to the user. Then we had to compare each day's price against the threshold that we made. This looks like the following:

2_week

This was a complicated conditional logic feat which was accomplished by looping through the symbols in the list. then looping through each day in the two week percent change data frame indexed on the symbol. Then comparing the two and pulling the symbols date and value into a list of messages to be sent to the user using twilio. This is displayed as the following:

conditional


Contributors

Created by Ben Spiegel, Silvano Ross and Tracie Stipp while in the UW FinTech Bootcamp

Contact Info:

email: [email protected] | GitHub | LinkedIn

email: [email protected] | GitHub | LinkedIn

email: [email protected] | GitHub | LinkedIn


crypto_notifier's People

Contributors

silvanoross avatar stipptracie avatar brspiegel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.