app that fetches stock prices, compares them to defined references and triggers alerts
MIT License
Command line app that fetches stock prices, compares them to defined references and triggers alert if necessary.
Note:
> /dev/null
to your command.Using the docker image is most convenient. It brings its own nodejs installation an does not need to be downloaded explicitly.
docker run -v $(pwd)/example:/workdir schnatterer/stock-alert
You can also run it with a local node js instance.
yarn install
cd example
node ../src/cli/main.js
All configuration is done via config.json
that is read from the working directory.
See example/config.json
The stock prices are read from and written to a prices.json
in the working directory.
There is one exemplary parser implementation (including a test) but you can easily extend this for your favorit stock website:
<name>parser.json
in the src/parsers
folder that scrapes/parses the price of your stock from a URL.config.json
: set the source
of a stock to <name>
.Example (let's set <name>
to paul
):
docker run -v $(pwd)/example:/workdir -v $(pwd)/src/parsers/paulParser.js:/app/src/parsers/paulParser.js schnatterer/stock-alert
PRs for new parsers welcome.