Welcome to Crypto Alert Bot! This repository contains code for a Telegram bot designed to alert users when a cryptocurrency experiences a significant increase in price. This README provides an overview of the bot's functionality, how to set it up, and future plans for development.
- Functionality
- How to Use
- Configure Settings
- Where to Run My Bot?
- Live Example
- Future Development
- Contributing
- Disclaimer
The Crypto Alert Bot monitors the price of cryptocurrencies at regular intervals and sends alerts to a designated Telegram group when the price of a selected cryptocurrency rises sharply.
Currently, the bot is configured to detect a price increase of 5% within the last hour (at the moment the bot can only evaluate the last hour 1h
, in the future we intend to add more options, such as 4h
, 24h
, 7d
...). It checks for price changes every 10 minutes and sends a notification to the Telegram group if the criteria are met.
You can set your own parameters for the bot at config.py
To use the Crypto Alert Bot, follow these steps:
-
Clone the Repository
git clone https://github.com/mathiasfc/crypto-alert.git
-
Set Up Telegram Bot:
- Create a new bot on Telegram using BotFather and obtain the API token. You can follow the official Telegram documentation to obtain your bot token.
- Obtain the Telegram Chat ID where you want to receive alerts. You can find instructions on how to obtain the chat ID here.
- Rename the
.env.example
file to.env
and fill it with the obtained values:TELEGRAM_API_TOKEN=your_bot_token_here TELEGRAM_CHAT_ID=your_chat_id_here
-
Configure Settings:
-
Open the
config.py
file located in the project directory.-
interval
: This parameter determines the interval in seconds at which the bot checks for price changes. By default, it is set to 600 seconds (10 minutes). You can modify this value to adjust how frequently the bot checks for price updates. -
difference_to_alert
: This parameter defines the percentage difference between the previous and current price of a cryptocurrency. If the difference exceeds this threshold, the bot sends a notification to the Telegram group. The default value is 5%, but you can modify it based on your desired sensitivity to price changes.
-
-
-
Install Dependencies: Install the required Python dependencies using pip.
pip install -r requirements.txt
⚠️ python 3.8 or higher is required -
Run the Bot (local): Execute the main Python script to start the bot.
python main.py
You have the option to run the Crypto Alert Bot either locally or on a hosting service that supports Python, such as PythonAnywhere.
In the future, we plan to expand the functionality of the Crypto Alert Bot to include:
- Customizable alert thresholds: Allow users to set their desired percentage increase for alerts.
- Additional platforms: Extend the bot's capabilities to other messaging platforms beyond Telegram.
- Enhanced analysis: Implement more sophisticated analysis techniques to identify potentially lucrative cryptocurrency investments.
- User interaction: Allow users to interact with the bot to request specific information or perform actions.
Contributions to the Crypto Alert Bot are welcome! If you have any ideas for improvements or new features, please open an issue or submit a pull request ☕
Please note that cryptocurrency trading carries inherent risks, and the Crypto Alert Bot is provided for informational purposes only. The bot's alerts should not be considered financial advice, and users should conduct their own research before making any investment decisions.
Happy trading!