Skip to content

shreyaadani/KryptoAlertAPI-18BCE10257

Repository files navigation

KyptoAlertAPI-18BCE10257

a price alert application that triggers an email when the user’s target price is achieved.

By Shreyaa Dani


Repository consists for 4 files:
  1. KyptoAlertAPI.ipynb
  2. MarketPriceCheckandAlert.ipynb
  3. EmailSender.ipynb
  4. DATABASE SETUP (.txt)

INSTALLATION

Pull the repository and Check out all the files in your local directory (please check out ppt for understanding of the files and architechture)

DATABASE SETUP

    Create Database Username= postgres and Password=postgres
  • Run PGAdmin(Postgresql)
  • Connect to the DB server
  • Open query window
  • Run all the query provided in DATABASE SETUP file

DATABASE CONTENTS

  1. TABLE USERDATA : it will hold user credentials and email id
  2. TABLE ALERT : it holds all the alerts set by each user and their status
  3. TABLE ALERTQ : this table simulates the queue functionality between MarketPriceCheckandAlert and EmailSender

PYTHON APPLICATION SETUP

  • Start Jupyter Notebook
  • Make sure your Jupyter Notebook is running on same system as postgres server
  • Open Each Notebook provided in the repostitory and execute

TESTING THE API

CREATALERT API

SYNTAX : http://127.0.0.1:5000/alert/create/uid/price EXAMPLE : http://127.0.0.1:5000/alert/create/9/778373

DELETEALERT API

SYNTAX : http://127.0.0.1:5000/alert/delete/uid/aid EXAMPLE : http://127.0.0.1:5000/alert/delete/9/107

LIST ALERTS API

SYNTAX : http://127.0.0.1:5000/alert/myalter/uid EXAMPLE : http://127.0.0.1:5000/alert/myalert/9

INSTRUCTION FOR EMAIL SETUP

 
Either generate a new email for this purpose 
Go to your Google Account.
On the left navigation panel, choose Security.
On the 'Signing in to Google' panel, choose App passwords. If you don’t see this option:
2-Step Verification is not set up for your account
2-Step Verification is set up for security keys only
Your account is through work, school or other organisation
You’ve turned on Advanced Protection for your account
At the bottom, choose Select app and choose the app that you’re using.
Choose Select device and choose the device that you're using.
Choose Generate.
Follow the instructions to enter the app password. The app password is the 16-character code in the yellow bar on your device.
Choose Done.
  • Update Sender email id and secret key in EmailSender Notebook before execution

About

ASSESSMENT GIVEN BY KYPTO COMPANY

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published