Skip to content

Telegram bot for crypto information and tracking made with Python

License

Notifications You must be signed in to change notification settings

StepanBlaha/TelegramFinanceBot

Repository files navigation

TelegramFinanceBot

Telegram bot for tracking prices of crypto currencies and getting useful insights on the current market.

Key Features

  • Price of currency over time
  • Graphs, dataframes and more informations about various indicators
  • Tracking of price changes
  • Automated periodical digests of market changes
  • Custom account system for keeping track of users assets

Built with

Python MongoDB NumPy Pandas

Requirements

  • OpenAI api key
  • Telegram Bot api token
  • MongoDB uri
  • Python version 3.11 or newer
  • You can find the list of required libraries and packages in requirements.txt

Installation Guide

git clone https://github.com/StepanBlaha/TelegramFinanceBot
cd TelegramFinanceBot
python -m venv env
.\env\Scripts\activate
pip install -r requirements.txt

Configuration

In OOP/Bot.py change "BOT_KEY" for your telegram bot token:

class SBBot:
    def __init__(self):
        self.application = Application.builder().token(os.getenv("BOT_KEY")).build()
        self.add_handlers()
        self.bot = Bot(os.getenv("BOT_KEY"))
        self.create_objects()

In OOP/AiFunctions.py change "OPENAI_KEY" for your OpenAI api key:

class AI:
    def __init__(self):
        self.api_key = os.getenv("OPENAI_KEY")
        self.client = OpenAI(api_key=self.api_key)

In OOP/DatabaseFunctions.py change "MONGO_URI" for your MongoDB uri:

class DBBase(abc.ABC):
    def __init__(self, uri=None, db_name="TelegramFinance"):
        """
        Initializes the MongoDB connection.
        """
        if uri is None:
            uri = os.getenv("MONGO_URI")

You can find the full setup guide with tips on how to get the telegram bot token in Documentation.pdf

To run

python OOP/Bot.py

Usage

After setting up the bot and adding the command descriptions (Via Documentation.pdf) you can do /help or open the command menu in the chat with your bot to see all the commands.
Help command

Now simply use any command. Dont forget to use the correct format for its parmeters!

Example command

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this project better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

License

Distributed under MIT License. See LICENSE.txt for more information.

Contact

Author - Stepan Blaha- stepa15.b@gmail.com
Project Link: https://github.com/StepanBlaha/TelegramFinanceBot

About

Telegram bot for crypto information and tracking made with Python

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages