Git Product home page Git Product logo

stock-watcher's Introduction

Stock-watcher

This simply script meant to parse a stock price and to send SMS if a threshold is passed.

Requirements

  1. Python 3.6 or newer (python --version or python3 --version)
  2. Update your pip: sudo python -m pip install --upgrade pip (if don't have any, for installation sudo apt-get install python3-pip)
  3. Install Beautiful soup sudo pip install bs4
  4. Install Requests sudo pip install requests
  5. Install Requests-HTML sudo pip install requests_html (this one is requires Python 3.6 and is used with trading-view data provider)

Installation

Please, do the following:

  1. You need to obtain a valid API key for SMS.RU service
  2. You need to create a file key.txt, and insert the API key into the file
  3. You need to create a file config.txt, and insert your phone number into the file (please look into example config-example.txt)
  4. You need to create a task with autostarting stock-watcher.py. You can do it via crontab or via systemd
  5. You need to create a task with server rebooting (because this allows you to flush sent SMS counter)
  6. You need to make stock-watcher.py executable (chmod +x)

Crontab editing (examples shown)

crontab -e

this allows reboot server every day at 04:05 am (at server local time)

0 4 * * * /sbin/shutdown -r +5

@reboot sleep 120 && /home/user/git/Stock-watcher/stock-watcher.py >> /home/user/git/Stock-watcher/stock-watcher.log 2>&1

stock-watcher's People

Contributors

areso avatar

Watchers

James Cloos 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.