This is a Telegram bot that provides buy and sell signals for Bitcoin based on various technical indicators and candlestick patterns. π The bot uses CoinGecko API to fetch real-time Bitcoin price data and TA-Lib for technical analysis. πΉ
-
Buy and Sell Signals π°: The bot generates trading signals based on multiple indicators such as:
- SMA (Simple Moving Average) π
- RSI (Relative Strength Index) π
- MACD (Moving Average Convergence Divergence) π
- Bollinger Bands π
- Candlestick Patterns (e.g., Doji, Hammer) π₯
-
Real-Time Bitcoin Price πΈ: Displays the current price of Bitcoin along with the trading signal.
-
Telegram Bot Interface π€: The bot is built on Telegramβs Bot API to allow easy interaction with users.
- Python 3.7+: Make sure you have Python 3.7 or later installed.
- Telegram Bot API Token: Youβll need to create a bot on Telegram and get its API token. π²
Clone this repository to your local machine:
git clone https://github.com/your-username/bitcoin-signal-bot.git
cd bitcoin-signal-botIt's best to create a virtual environment to avoid conflicts with other Python packages on your system. π§βπ»
python -m venv venvActivate the virtual environment:
-
On Windows:
.\venv\Scripts\activate
-
On macOS/Linux:
source venv/bin/activate
Install the necessary Python packages using pip:
pip install -r requirements.txtYou need to add your Telegram Bot API token. Open bot.py and replace the placeholder your_telegram_bot_token with your botβs API token.
API_TOKEN = "your_telegram_bot_token" # Replace with your actual tokenTo run the bot, execute the following command:
python bot.pyThe bot will start and listen for incoming commands like /start and /signal. π―
/startπ: Displays a welcome message and an overview of how the bot works./signalπ₯: Provides the latest buy/sell signal along with the reasoning based on technical indicators and candlestick patterns.
The bot requires the following Python packages:
requests: To fetch data from the CoinGecko API. πpandas: For handling data in tabular form. ποΈtalib: For technical analysis (used for calculating indicators). πtelegram: For interacting with the Telegram Bot API. π€
To install the dependencies, you can use:
pip install requests pandas talib telegramAlternatively, you can use the requirements.txt file to install all dependencies:
pip install -r requirements.txtFeel free to modify the bot to add more indicators, adjust the logic for buy/sell signals, or customize the messages. β¨
This project is licensed under the MIT License - see the LICENSE file for details. π
For any issues or questions, feel free to open an issue on the GitHub repository or contact me directly. π