# β‘ BTCWatcherBot
BTCWatcherBot is a comprehensive Telegram bot that helps you monitor Bitcoin and the Lightning Network. It supports creating Bitcoin wallets, Lightning wallets (via LNbits), tracking prices, fees, transactions, and more!
## π **Features**
- π **Create Bitcoin Wallets** and generate seed phrases.
- β‘ **Create Lightning Wallets** and manage invoices/payments via LNbits.
- π° **Check Balances** for both Bitcoin and Lightning wallets.
- π **Track Bitcoin Prices** in USD and EUR.
- β½ **Check Transaction Fees** and set alerts.
- π **Monitor Blockchain Events** like new blocks and large transactions.
- π **Set Price and Fee Alerts** with real-time notifications.
- π **Receive Lightning Payments** and generate QR codes for invoices.
## π **Getting Started**
### π§ **Prerequisites**
Ensure you have the following installed:
- **Python 3.10+**
- **Telegram Bot Token** (from [BotFather](https://core.telegram.org/bots#botfather))
- **LNbits Instance** for Lightning wallet operations
- **Flask** for webhook server
### π¦ **Dependencies**
Install required packages:
```bash
pip install requests python-telegram-bot==13.7 bit mnemonic qrcode flask python-dotenvCreate a .env file to store your bot token:
BOT_TOKEN=your_telegram_bot_token
BTCWatcherBot/
β-- main.py
β-- wallet_manager.py
β-- ln_wallet_manager.py
β-- wallets.json
β-- ln_wallets.json
β-- .env
-
Start the Bot:
python3 main.py
-
Start the Webhook Server for Lightning payments (Flask runs on port 5050):
The webhook server runs automatically in a separate thread when the bot starts.
/create_walletβ Create a new Bitcoin wallet./check_balanceβ Check your Bitcoin wallet balance./send_bitcoin [address] [amount]β Send Bitcoin to a specified address./wallet_infoβ Show your wallet information.
/create_ln_walletβ Create a new Lightning wallet./check_ln_balanceβ Check your Lightning wallet balance./create_ln_invoice [amount] [memo]β Create a Lightning invoice and QR code./pay_ln_invoice [bolt11_invoice]β Pay a Lightning invoice./send_to_ln_address [ln_address] [amount]β Send sats to a Lightning Address.
/priceβ Get the current Bitcoin price./feesβ Check current transaction fees./monitor_blocksβ Monitor new Bitcoin blocks./track_tx [txid]β Track a Bitcoin transaction./statsβ Get Bitcoin network stats./ln_statsβ Get Lightning Network stats.
/set_price_alert [price]β Set a price alert./set_fee_alert [fee]β Set a fee alert.
- Keep your seed phrases and private keys secure!
- Avoid sharing your admin keys and bot tokens.