Files
Place-Order-Trading-Bot/telegram_bot_notebook_cell.txt
T

32 lines
1.0 KiB
Plaintext
Raw Normal View History

# ==========================================
# TELEGRAM BOT COMMANDS - Background Service
# ==========================================
from telegram_bot_commands import TelegramBotCommander, get_bot_controller
import threading
# Start Telegram Bot in background
try:
print("🚀 Starting Telegram Bot Commander...")
bot_commander = TelegramBotCommander()
bot_thread = bot_commander.start_background()
# Get controller for integration with execute_trade
bot_controller = get_bot_controller()
print("✅ Telegram Bot is running in background!")
print("📱 Available Commands:")
print(" /status - Bot status & positions")
print(" /pause - Pause trading")
print(" /resume - Resume trading")
print(" /close - Close all positions (requires confirm)")
print(" /balance - Account balance")
print(" /stats - Performance stats")
print(" /help - Show help")
except Exception as e:
print(f"❌ Failed to start Telegram Bot: {e}")
bot_controller = None