This Telegram bot provides users with real-time cryptocurrency prices and allows them to set price alerts for their favorite cryptocurrencies. It utilizes the CoinMarketCap website to fetch current price data and SQLite for storing user alerts.
- Fetch current prices for cryptocurrencies like Bitcoin and Ethereum.
- Set alerts for specific price thresholds.
- Receive notifications when the current price meets the specified conditions.
- Python
requests
librarybeautifulsoup4
librarypython-telegram-bot
librarypython-dotenv
librarysqlite3
(included with Python)
-
Clone the repository:
git clone https://github.com/AliFathi1325/Crypto_Alert_Bot.git cd cryptocurrency-bot
-
Install the required libraries:
pip install -r requirements.txt
-
Create a
.env
file in the root directory and add your Telegram bot token:BOT_TOKEN=your_telegram_bot_token
-
Run the bot:
python bot.py
- Start the bot by sending
/start
to it in your Telegram chat. - Select options to view current cryptocurrency prices or create a price alert.
- For price alerts, specify the price at which you want to be notified.