Skip to content

Latest commit

 

History

History
36 lines (21 loc) · 2.86 KB

README.md

File metadata and controls

36 lines (21 loc) · 2.86 KB

Stock-Reminder Bot 🤖

Build Status codecov Code style: black

A twitter bot that registers reminders for stock and cryptocurrency prices. Mention the bot with a cashtag followed by a stock or cryptocurrency ticker symbol and the reminder date:

bot_mention

The bot will then get back to you on the specified date with your investment results and a randomly generated gif that will match your earnings:

bot_mention

bot_mention

Additionally, the bot can also produce rating reports when it is mentioned with a ticker symbol and the words "report" or "analyse"/"analyze":

bot_mention

Implementation 🛠️

The bot uses RomelTorres' python wrapper for the Alpha Vantage API. It's deployed on Heroku with Docker 🐳 and uses a clock process for replying to twitter mentions and posting reminders. When a mention is in the correct format, a reminder object is saved into a postgres database through peewee's ORM. Every 2 minutes, the bot will check whether any reminders are due and publish an update by replying to the initial tweet with the investment results. Further implementation details can be found in the project's medium post.

Usage

Register an account on Twitter's Developer Platform and store your credentials in /envfiles/local.env. To run the bot locally, start the project containers with make env-start and then try out the bot's features with:

make reply-mentions

To run all the tests use:

make test

To check code formatting:

make linting