Giter Site home page Giter Site logo

opvoid / tickergram-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from a0rtega/tickergram-bot

0.0 0.0 0.0 261 KB

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

Home Page: https://t.me/tickergrambot

License: MIT License

Python 100.00%

tickergram-bot's Introduction

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

tickergram-bot's People

Contributors

a0rtega avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.