|
@@ -160,7 +160,7 @@ class CopyTradingMonitor:
|
|
if self.notifications_enabled:
|
|
if self.notifications_enabled:
|
|
try:
|
|
try:
|
|
await asyncio.wait_for(
|
|
await asyncio.wait_for(
|
|
- self.notification_manager.send_message(startup_message),
|
|
|
|
|
|
+ self.notification_manager.send_generic_notification(startup_message),
|
|
timeout=5.0
|
|
timeout=5.0
|
|
)
|
|
)
|
|
except Exception as e:
|
|
except Exception as e:
|
|
@@ -408,7 +408,7 @@ class CopyTradingMonitor:
|
|
# Send notification
|
|
# Send notification
|
|
if self.notifications_enabled:
|
|
if self.notifications_enabled:
|
|
status = "✅ SUCCESS" if success else "❌ FAILED"
|
|
status = "✅ SUCCESS" if success else "❌ FAILED"
|
|
- await self.notification_manager.send_message(
|
|
|
|
|
|
+ await self.notification_manager.send_generic_notification(
|
|
f"🔄 Copy Trade {status}\n"
|
|
f"🔄 Copy Trade {status}\n"
|
|
f"Action: {trade.action}\n"
|
|
f"Action: {trade.action}\n"
|
|
f"Asset: {trade.coin}\n"
|
|
f"Asset: {trade.coin}\n"
|
|
@@ -425,7 +425,7 @@ class CopyTradingMonitor:
|
|
await self.state_manager.add_copied_trade_async(trade.original_trade_hash)
|
|
await self.state_manager.add_copied_trade_async(trade.original_trade_hash)
|
|
|
|
|
|
if self.notifications_enabled:
|
|
if self.notifications_enabled:
|
|
- await self.notification_manager.send_message(
|
|
|
|
|
|
+ await self.notification_manager.send_generic_notification(
|
|
f"❌ Copy Trade Error\n"
|
|
f"❌ Copy Trade Error\n"
|
|
f"Asset: {trade.coin}\n"
|
|
f"Asset: {trade.coin}\n"
|
|
f"Action: {trade.action}\n"
|
|
f"Action: {trade.action}\n"
|
|
@@ -595,7 +595,7 @@ class CopyTradingMonitor:
|
|
duration_hours = session_info['session_duration_seconds'] / 3600
|
|
duration_hours = session_info['session_duration_seconds'] / 3600
|
|
duration_str = f"\nSession duration: {duration_hours:.1f} hours"
|
|
duration_str = f"\nSession duration: {duration_hours:.1f} hours"
|
|
|
|
|
|
- await self.notification_manager.send_message(
|
|
|
|
|
|
+ await self.notification_manager.send_generic_notification(
|
|
f"🛑 Copy Trading Stopped\n"
|
|
f"🛑 Copy Trading Stopped\n"
|
|
f"📊 Tracked positions: {session_info['tracked_positions_count']}\n"
|
|
f"📊 Tracked positions: {session_info['tracked_positions_count']}\n"
|
|
f"🔄 Copied trades: {session_info['copied_trades_count']}"
|
|
f"🔄 Copied trades: {session_info['copied_trades_count']}"
|