Skynet¶
Stock Alerter using Robinhood
/YFinance
api
The stock ticker value, minimum amount below and maximum amount above which you’d like to be notified has to be added to a file: stocks.json
.
Below is an example for a single stock, this can be extended as needed.
Source File¶
Minimum and maximum values for the stock can be either a list or a comma separated string. The order doesn’t matter.
{
"AMZN": [4000, 3000],
"TSLA": "1000, 1400"
}
Env Variables¶
This script is designed to run locally using env vars stored in a .env
file which is loaded upon startup.
Store env vars as below (either in .env
file or as regular env vars)
For stock analyzing:
robinhood_user = xxx@yyy.com
robinhood_pass = <Robinhood Password>
robinhood_qr = <Robinhood QR Code>
:bulb: Skynet can work even without
Robinhood
access, as it automatically choosesYahooFinance
to gather the details. However usingYahooFinance
runs longer due to endpoint restrictions.
For notifications:
gmail_user = xxx@gmail.com
gmail_pass = PASSWORD
phone = +1234567890
:bulb: Phone numbers can be
comma
separated values, to notify multiple people. If notifications viagmail-connector
fails, an SMS is triggered using AWS SNS.
Coding Standards¶
Docstring format: Google
Styling conventions: PEP 8
Clean code with pre-commit hooks: flake8
and
isort
Linting¶
PreCommit
will ensure linting, and the doc creation are run on every commit.
Requirement
pip install --no-cache --upgrade sphinx pre-commit recommonmark
Usage
pre-commit run --all-files
Runbook¶
License & copyright¶
© Vignesh Sivanandha Rao, Skynet
Licensed under the MIT License