Procházet zdrojové kódy

Update ROE percentage retrieval in positions command to use 'returnOnEquity' from CCXT response. This change enhances clarity and consistency in financial data presentation for users.

Carles Sentis před 1 týdnem
rodič
revize
1cd72b8630
2 změnil soubory, kde provedl 3 přidání a 3 odebrání
  1. 2 2
      src/commands/info/positions.py
  2. 1 1
      trading_bot.py

+ 2 - 2
src/commands/info/positions.py

@@ -81,8 +81,8 @@ class PositionsCommands(InfoCommandsBase):
                             unrealized_pnl = (entry_price - mark_price) * abs_current_amount
                     unrealized_pnl = unrealized_pnl or 0.0
 
-                    # ROE Percentage (from exchange, cached by heartbeat)
-                    roe_percentage = position_trade.get('unrealized_pnl_percentage') or 0.0
+                    # ROE Percentage from CCXT response
+                    roe_percentage = position_trade.get('returnOnEquity', 0.0) * 100
 
                     # Add to totals
                     individual_position_value = position_trade.get('position_value')

+ 1 - 1
trading_bot.py

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