Skip to content

bigfoot19982/NASDAQ-NYSE-bot

Repository files navigation

NASDAQ-NYSE-bot

Subscribe to the latest news of American stocks

Version License License last_commit

Why one might need this telegram bot?

No matter if you're a long term investor or a daily trader, plunge into company sentiment must be one of the major parts of your due diligence before stock purchase. For instance, if a person hadn't got the news that the Chinese leader Xi Jinping has banned paid tutor education in China, he would have bought the TAL Education dip and lost a huge part of his money.

On top of that, even if you've bought a stock already you're supposed to follow the news on it to make sure that the company keeps on progressing. Otherwise, you may buy one of the top S&P 500 stocks and in a decade turn out to be holding a toxic non-profitable asset (AT&T in the beginning of the century and now).

The best way to stay in the loop is to get short corporate news on a daily basis. This telegram bot provides you with such opportunity.

How does it work?

Concealed from user

On bot startup we create two tables in Postgresql:

  1. A table of companies that people are subscribed to. Each company in the table is unique. We need the table to repeatedly go through the companies and check for news on the websites dedicated to the stocks.
  2. A table of users. If while going through companies we found that there are some news on the stock site, we go through the users who have subscription to the company and send them the news.

Every 5 seconds the bot checks if there are news on the websites dedicated to the stocks users are subscribed to.

Companies in pgAdmin Users in pgAdmin

Interaction with user

When a user starts working with the bot, he is required to type in a ticker of a company he is interested in.

On receiving the ticker the bot parses stockanalysis.com to get the picture(if present), primary data, and a short description of the stock. The bot returns the parsed data providing the opportunity to subcribe to the stock news if the user finds the company interesting.

if the user presses the button, the bot checks if the company is in the table of companies(if not adds it there) and:

  1. if user was not subscribed to the stock news notifies the user of the subscription and sends the first news on the stock
  2. otherwise merely reminds him of presence of subscription

*For the convenience of user under each news sent there is a button to unsubscribe

The first news

Releases

No releases published

Packages

No packages published

Languages