Răsfoiți Sursa

Increment bot version to 2.6.295 and update notification methods in PositionTracker and NotificationManager

- Updated BOT_VERSION to 2.6.295.
- Changed notification method calls in PositionTracker to use send_generic_notification for consistency.
- Updated NotificationManager to utilize send_generic_notification for stop loss execution notifications, enhancing notification handling.
Carles Sentis 1 zi în urmă
părinte
comite
8195f4664b

+ 4 - 4
src/monitoring/position_tracker.py

@@ -197,7 +197,7 @@ class PositionTracker:
                 f"Leverage: {position.get('current_leverage', position['max_leverage']):.1f}x"
             )
             
-            await self.notification_manager.send_notification(message)
+            await self.notification_manager.send_generic_notification(message)
             logger.info(f"Position opened: {symbol} {side} {abs(size)}")
             
         except Exception as e:
@@ -241,7 +241,7 @@ class PositionTracker:
                 f"PnL: ${pnl:.3f}"
             )
             
-            await self.notification_manager.send_notification(message)
+            await self.notification_manager.send_generic_notification(message)
             logger.info(f"Position closed: {symbol} {side} PnL: ${pnl:.3f}")
             
         except Exception as e:
@@ -276,7 +276,7 @@ class PositionTracker:
                         f"Side: {side}\n"
                         f"Leverage: {prev_leverage:.1f}x → {curr_leverage:.1f}x"
                     )
-                    await self.notification_manager.send_notification(message)
+                    await self.notification_manager.send_generic_notification(message)
                 
             # Check if position size changed significantly
             size_change = abs(curr_size) - abs(prev_size)
@@ -293,7 +293,7 @@ class PositionTracker:
                     f"Change: {'+' if size_change > 0 else ''}{size_change:.4f}"
                 )
                 
-                await self.notification_manager.send_notification(message)
+                await self.notification_manager.send_generic_notification(message)
                 logger.info(f"Position changed: {symbol} {change_type} by {size_change:.4f}")
                 
         except Exception as e:

+ 1 - 1
src/notifications/notification_manager.py

@@ -491,7 +491,7 @@ class NotificationManager:
 💡 Your external stop loss order worked as intended!
             """
             
-            await self.send_notification(message.strip())
+            await self.send_generic_notification(message.strip())
             logger.info(f"🛑 Stop loss execution notification sent: {token} {position_side} @ ${price:.2f}")
             
         except Exception as e:

+ 1 - 1
trading_bot.py

@@ -14,7 +14,7 @@ from datetime import datetime
 from pathlib import Path
 
 # Bot version
-BOT_VERSION = "2.6.294"
+BOT_VERSION = "2.6.295"
 
 # Add src directory to Python path
 sys.path.insert(0, str(Path(__file__).parent / "src"))