|
@@ -136,7 +136,7 @@ Tap the buttons below for instant access to key functions.
|
|
• Price alarm triggers
|
|
• Price alarm triggers
|
|
• External trade detection & sync
|
|
• External trade detection & sync
|
|
• Auto stats synchronization
|
|
• Auto stats synchronization
|
|
-• {Config.BOT_HEARTBEAT_SECONDS}-second monitoring interval
|
|
|
|
|
|
+• {heartbeat}-second monitoring interval
|
|
|
|
|
|
<b>📊 Universal Trade Tracking:</b>
|
|
<b>📊 Universal Trade Tracking:</b>
|
|
• Bot trades: Full logging & notifications
|
|
• Bot trades: Full logging & notifications
|
|
@@ -152,7 +152,7 @@ Type /help for detailed command information.
|
|
|
|
|
|
<b>⚙️ Configuration:</b>
|
|
<b>⚙️ Configuration:</b>
|
|
• Symbol: {symbol}
|
|
• Symbol: {symbol}
|
|
-• Default Amount: {amount}
|
|
|
|
|
|
+• Default Token: {symbol}
|
|
• Network: {network}
|
|
• Network: {network}
|
|
|
|
|
|
<b>🛡️ Safety Features:</b>
|
|
<b>🛡️ Safety Features:</b>
|
|
@@ -257,7 +257,7 @@ For support, contact your bot administrator.
|
|
|
|
|
|
<b>⚙️ Configuration:</b>
|
|
<b>⚙️ Configuration:</b>
|
|
• Symbol: {symbol}
|
|
• Symbol: {symbol}
|
|
-• Default Amount: {amount}
|
|
|
|
|
|
+• Default Token: {symbol}
|
|
• Network: {network}
|
|
• Network: {network}
|
|
|
|
|
|
<b>🛡️ Safety Features:</b>
|
|
<b>🛡️ Safety Features:</b>
|
|
@@ -1104,7 +1104,7 @@ For support, contact your bot administrator.
|
|
f"✅ Connected to Hyperliquid {'Testnet' if Config.HYPERLIQUID_TESTNET else 'Mainnet'}\n"
|
|
f"✅ Connected to Hyperliquid {'Testnet' if Config.HYPERLIQUID_TESTNET else 'Mainnet'}\n"
|
|
f"📊 Default Symbol: {Config.DEFAULT_TRADING_TOKEN}\n"
|
|
f"📊 Default Symbol: {Config.DEFAULT_TRADING_TOKEN}\n"
|
|
f"📱 Manual trading ready!\n"
|
|
f"📱 Manual trading ready!\n"
|
|
- f"🔄 Order monitoring: Active ({Config.BOT_HEARTBEAT_SECONDS}s interval)\n"
|
|
|
|
|
|
+ f"🔄 Order monitoring: Active ({heartbeat}s interval)\n"
|
|
f"🔄 External trade monitoring: Active\n"
|
|
f"🔄 External trade monitoring: Active\n"
|
|
f"🔔 Price alarms: Active\n"
|
|
f"🔔 Price alarms: Active\n"
|
|
f"📊 Auto stats sync: Enabled\n"
|
|
f"📊 Auto stats sync: Enabled\n"
|
|
@@ -1930,10 +1930,24 @@ This will place a limit {exit_side} order at ${profit_price:,.2f} to capture pro
|
|
|
|
|
|
for fill in recent_fills:
|
|
for fill in recent_fills:
|
|
fill_time = fill.get('timestamp')
|
|
fill_time = fill.get('timestamp')
|
|
- if fill_time and fill_time > self.last_processed_trade_time:
|
|
|
|
- new_trades.append(fill)
|
|
|
|
- if fill_time > latest_trade_time:
|
|
|
|
- latest_trade_time = fill_time
|
|
|
|
|
|
+ if fill_time:
|
|
|
|
+ # Convert timestamps to comparable format
|
|
|
|
+ try:
|
|
|
|
+ # Convert fill_time to string if it's not already
|
|
|
|
+ if isinstance(fill_time, (int, float)):
|
|
|
|
+ # Assume it's a unix timestamp
|
|
|
|
+ fill_time_str = datetime.fromtimestamp(fill_time / 1000 if fill_time > 1e10 else fill_time).isoformat()
|
|
|
|
+ else:
|
|
|
|
+ fill_time_str = str(fill_time)
|
|
|
|
+
|
|
|
|
+ # Compare as strings
|
|
|
|
+ if fill_time_str > self.last_processed_trade_time:
|
|
|
|
+ new_trades.append(fill)
|
|
|
|
+ if fill_time_str > latest_trade_time:
|
|
|
|
+ latest_trade_time = fill_time_str
|
|
|
|
+ except Exception as timestamp_error:
|
|
|
|
+ logger.warning(f"⚠️ Error processing timestamp {fill_time}: {timestamp_error}")
|
|
|
|
+ continue
|
|
|
|
|
|
if not new_trades:
|
|
if not new_trades:
|
|
return
|
|
return
|
|
@@ -2379,7 +2393,7 @@ This will place a limit {exit_side} order at ${profit_price:,.2f} to capture pro
|
|
|
|
|
|
📊 <b>Order Monitoring:</b>
|
|
📊 <b>Order Monitoring:</b>
|
|
• Active: {'✅ Yes' if self.monitoring_active else '❌ No'}
|
|
• Active: {'✅ Yes' if self.monitoring_active else '❌ No'}
|
|
-• Check Interval: {Config.BOT_HEARTBEAT_SECONDS} seconds
|
|
|
|
|
|
+• Check Interval: {heartbeat} seconds
|
|
• Orders Tracked: {len(self.last_known_orders)}
|
|
• Orders Tracked: {len(self.last_known_orders)}
|
|
• Positions Tracked: {len(self.last_known_positions)}
|
|
• Positions Tracked: {len(self.last_known_positions)}
|
|
|
|
|
|
@@ -2505,7 +2519,7 @@ Will trigger when {token} price moves {alarm['direction']} ${target_price:,.2f}
|
|
|
|
|
|
⏰ <b>Created:</b> {datetime.now().strftime('%H:%M:%S')}
|
|
⏰ <b>Created:</b> {datetime.now().strftime('%H:%M:%S')}
|
|
|
|
|
|
-💡 The alarm will be checked every {Config.BOT_HEARTBEAT_SECONDS} seconds and you'll receive a notification when triggered.
|
|
|
|
|
|
+💡 The alarm will be checked every {heartbeat} seconds and you'll receive a notification when triggered.
|
|
"""
|
|
"""
|
|
|
|
|
|
await update.message.reply_text(message.strip(), parse_mode='HTML')
|
|
await update.message.reply_text(message.strip(), parse_mode='HTML')
|
|
@@ -2563,7 +2577,7 @@ Will trigger when {token} price moves {alarm['direction']} ${target_price:,.2f}
|
|
|
|
|
|
📈 <b>Log Configuration:</b>
|
|
📈 <b>Log Configuration:</b>
|
|
• Log Level: {Config.LOG_LEVEL}
|
|
• Log Level: {Config.LOG_LEVEL}
|
|
-• Heartbeat Interval: {Config.BOT_HEARTBEAT_SECONDS}s
|
|
|
|
|
|
+• Heartbeat Interval: {heartbeat}s
|
|
• Bot Uptime: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}
|
|
• Bot Uptime: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}
|
|
|
|
|
|
💡 <b>Log Management:</b>
|
|
💡 <b>Log Management:</b>
|