Browse Source

Update order monitoring interval in Telegram bot messages - Replace hardcoded heartbeat value with Config.BOT_HEARTBEAT_SECONDS for consistency across order monitoring and alarm notifications, ensuring accurate display of check intervals in user messages.

Carles Sentis 6 days ago
parent
commit
2470ad3d59
1 changed files with 4 additions and 4 deletions
  1. 4 4
      src/telegram_bot.py

+ 4 - 4
src/telegram_bot.py

@@ -1104,7 +1104,7 @@ For support, contact your bot administrator.
                 f"✅ Connected to Hyperliquid {'Testnet' if Config.HYPERLIQUID_TESTNET else 'Mainnet'}\n"
                 f"📊 Default Symbol: {Config.DEFAULT_TRADING_TOKEN}\n"
                 f"📱 Manual trading ready!\n"
-                f"🔄 Order monitoring: Active ({heartbeat}s interval)\n"
+                f"🔄 Order monitoring: Active ({Config.BOT_HEARTBEAT_SECONDS}s interval)\n"
                 f"🔄 External trade monitoring: Active\n"
                 f"🔔 Price alarms: Active\n"
                 f"📊 Auto stats sync: Enabled\n"
@@ -2393,7 +2393,7 @@ This will place a limit {exit_side} order at ${profit_price:,.2f} to capture pro
 
 📊 <b>Order Monitoring:</b>
 • Active: {'✅ Yes' if self.monitoring_active else '❌ No'}
-• Check Interval: {heartbeat} seconds
+• Check Interval: {Config.BOT_HEARTBEAT_SECONDS} seconds
 • Orders Tracked: {len(self.last_known_orders)}
 • Positions Tracked: {len(self.last_known_positions)}
 
@@ -2519,7 +2519,7 @@ Will trigger when {token} price moves {alarm['direction']} ${target_price:,.2f}
 
 ⏰ <b>Created:</b> {datetime.now().strftime('%H:%M:%S')}
 
-💡 The alarm will be checked every {heartbeat} seconds and you'll receive a notification when triggered.
+💡 The alarm will be checked every {Config.BOT_HEARTBEAT_SECONDS} seconds and you'll receive a notification when triggered.
                 """
                 
                 await update.message.reply_text(message.strip(), parse_mode='HTML')
@@ -2577,7 +2577,7 @@ Will trigger when {token} price moves {alarm['direction']} ${target_price:,.2f}
 
 📈 <b>Log Configuration:</b>
 • Log Level: {Config.LOG_LEVEL}
-• Heartbeat Interval: {heartbeat}s
+• Heartbeat Interval: {Config.BOT_HEARTBEAT_SECONDS}s
 • Bot Uptime: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}
 
 💡 <b>Log Management:</b>