Stock alerts SMS app
- simple, ~ 200 LoC program
- stock prices feed from alphavantage
- twilio SMS alerts
- redis dev cache
Price feed details
You don't need a Pro account if you're ok with some delay (prices being checked once every ~10m)
this application requires a redis instance running locally
Twilio accounts alerts setup
- Twilio account
- A number registered with SMS capabilities
- API keys configured
config/stonks.rb and replace the configuration with the ticker symbols you want to watch.
The keys of the config hash are the ticker symbols. The values contain the alerts thresholds, low and high. Whenever the price crosses these values (on one direction or on the other) an SMS alert will be triggered.
Env vars / secret files
This app can be configured with environment variables and secret files, note env vars take precedence.
pipe separated list of numbers receiving the sms, if you want just one number just use the number, no spaces with international prefix e.g.
alphavantage api key
twilio number you registered (see prereqs.)
twilio credentials, pipe separated -
TWILIO_SID|TWILIO_TOKEN - e.g.
hope this helps :)