Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.
/ tickergram-bot Public archive

Tickergram is a Telegram bot to look up quotes, charts, general market sentiment and more.

License

Notifications You must be signed in to change notification settings

a0rtega/tickergram-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tickergram-logo

What's Tickergram?

Tickergram is a Telegram bot to look up quotes, charts, general market sentiment and more. It can be used collaboratively in group chats or by talking directly to it. Users can also keep a watchlist and receive price information notifications.

Supporting Tickergram

I run an instance of Tickergram at @tickergrambot with the /quote command openly available. By becoming a sponsor, you will support the project and get full access to this bot instance. Check the sponsor tiers for more information.

Or continue reading and get your own bot running in no time!

Bot commands

  • /quote <symbol> get quote
  • /chart <symbol> [1y,6m,5d] get price and volume chart
  • /news <symbol> get the latest news related to the symbol
  • /watch list|add|del [symbol] list, add or remove symbol from your watchlist
  • /watchlist get an overview of your watchlist
  • /watchlistnotify toggle the automatic watchlist notifications on and off
  • /overview get an overview of global markets
  • /feargreed get picture of CNN's Fear & Greed Index

quote and chart watchlist

Requirements

  • Python 3.9+
  • Python requirements, most notably yfinance, which is used to get financial information. The data provider may change in the future.
  • Redis, used as database to keep both permanent and temporary data (cache).

Installation

  • Talk to the @BotFather to create a new bot and get its token.
  • Install Redis.
  • Install Tickergram and its dependencies by running python setup.py install or pip install https://github.com/a0rtega/tickergram-bot/archive/refs/heads/main.zip.
  • Run the bot with the assistance of the self-explanatory help message:
$ tickergram-bot -h
usage: tickergram-bot [-h] [-p PASSWORD] [-a ALLOW] [-r REDIS] [-l PORT] [-d DB] token

Tickergram bot

positional arguments:
  token                 Telegram Bot API token

optional arguments:
  -h, --help            show this help message and exit
  -p PASSWORD, --password PASSWORD
                        Set a password required to interact with the bot (enables the /auth command)
  -a ALLOW, --allow ALLOW
                        Allow certain commands without requiring the password, comma-separated list (example: /quote,/chart)
  -r REDIS, --redis REDIS
                        redis host to use
  -l PORT, --port PORT  redis port to use
  -d DB, --db DB        redis database to use

If Tickergram is running correctly, the output should be similar to this:

$ tickergram-bot <token>
2021-09-28 19:52:58,820 Checking Telegram API token ...
2021-09-28 19:52:58,942 Telegram API token is valid
2021-09-28 19:52:58,942 Testing Redis connectivity ...
2021-09-28 19:52:58,944 Redis connection is ok

Usage

After sending the Telegram message /start or /help to the bot, it will reply with the supported bot commands.

The bot administrator can notify chat watchlists (when notifications are enabled) with the command tickergram-notify. It may be a good idea to run this command on a regular basis (for example at market open) using crontab.

Author

Alberto Ortega

License

MIT