- Added telegram_command_bot.py with slash commands (/buySOL, /sellBTC, etc) - Docker compose setup with DNS configuration - Sends trades as plain text to n8n webhook (same format as TradingView) - Improved Telegram success message formatting - Only responds to authorized chat ID (579304651) - Commands: /buySOL, /sellSOL, /buyBTC, /sellBTC, /buyETH, /sellETH
2.2 KiB
2.2 KiB
Telegram Trading Bot - Quick Reference
🚀 Quick Setup (3 steps)
1. Import n8n workflow
- Open: http://10.0.0.48:8098
- Import:
telegram-manual-trade-FINAL.json - Connect last node to "Check Risk" in Money Machine
- Activate workflow
2. Get Telegram Bot Token
Run on your phone:
Open Telegram → @BotFather → /newbot → follow instructions
You'll get a token like: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz
3. Run setup
./complete_telegram_setup.sh
Paste your bot token when asked.
📱 Using it on your phone
Just send messages to your Telegram chat:
buy sol
sell btc
buy eth
sell sol
The bot will:
- ✅ Parse your message
- ✅ Forward to n8n webhook
- ✅ n8n sends to your trading bot
- ✅ Trade executes with risk checks
- ✅ You get confirmation in Telegram
🔧 Management
View logs:
docker logs -f telegram-trade-bot
Restart bot:
docker restart telegram-trade-bot
Stop bot:
docker-compose -f docker-compose.telegram-bot.yml down
Start bot:
docker-compose -f docker-compose.telegram-bot.yml --env-file .env.telegram-bot up -d
📋 Configuration Files
.env.telegram-bot- Bot token and webhook URLdocker-compose.telegram-bot.yml- Docker configurationtelegram_trade_bot.py- Bot source code
🐛 Troubleshooting
Bot not responding?
docker logs telegram-trade-bot
Check if bot is running:
docker ps | grep telegram
Test webhook manually:
curl -X POST http://10.0.0.48:8098/webhook/manual-trade \
-H "Content-Type: application/json" \
-d '{"text": "buy sol"}'
Check n8n workflow:
- Is it activated?
- Is the webhook URL correct?
- Is it connected to Check Risk node?
✅ Supported Commands
From your phone, send any of these:
buy sol/buy btc/buy ethsell sol/sell btc/sell ethlong sol/short btc(same as buy/sell)
The bot extracts:
- Symbol: SOL, BTC, or ETH (defaults to SOL)
- Direction: sell/short = short position, anything else = long position
Commands are case-insensitive: BUY SOL, Buy Sol, buy sol all work!