# ✅ Telegram Bot Quick Setup

Your Telegram bot is already configured! Here's how to make it work:

## 1. Add Bot Token to `.env`

Add this line to your `.env` file:

```ini
TELEGRAM_BOT_TOKEN=7843108075:AAGsM3j3JqeSLwhFKKEzPIlqCJ8qelJSdig
```

## 2. Start the Bot Poller

Open a new terminal and run:

```bash
cd C:\xampp\htdocs\bitcoin
php bin\telegram-bot-runner.php
```

**Keep this terminal open** - it needs to run continuously to receive messages.

## 3. Subscribe to the Bot

1. Open Telegram on your phone/computer
2. Search for your bot (use the bot username from BotFather)
3. Start a chat and send: `/start`
4. You should receive: "✅ Subscribed successfully"

## 4. Test It

Run a quick test:

```bash
php bin/check-telegram-subscribers.php
```

This will show you all active subscribers.

## 5. Start Trading System

Now start the market data runner (it will send notifications when signals are generated):

```bash
php bin\market-data-runner.php
```

## What Happens Next?

When the algorithm generates a trade signal:
- You'll receive a Telegram notification with:
  - Symbol (BTCUSD)
  - Action (SELL_PUT or SELL_CALL)
  - Price
  - Reason
  - Mode (PAPER/LIVE)

## Commands:

- `/start` - Subscribe to alerts
- `/unsubscribe` - Stop receiving alerts

## Troubleshooting:

If not working, check:
1. ✅ `TELEGRAM_BOT_TOKEN` in `.env` file
2. ✅ `telegram-bot-runner.php` is running
3. ✅ You sent `/start` command to the bot
4. ✅ `market-data-runner.php` is running

---

**All components are already configured!** Just add the token and start the services.
