Selaa lähdekoodia

Update ROE percentage retrieval in positions command to use 'unrealized_pnl_percentage' from the database. This change enhances data consistency and aligns with recent updates for improved financial insights.

Carles Sentis 1 viikko sitten
vanhempi
sitoutus
da196f7a18
2 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  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 CCXT response
-                    roe_percentage = position_trade.get('returnOnEquity', 0.0) * 100
+                    # ROE Percentage from database
+                    roe_percentage = position_trade.get('unrealized_pnl_percentage', 0.0)
 
                     # 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.190"
+BOT_VERSION = "2.4.191"
 
 # Add src directory to Python path
 sys.path.insert(0, str(Path(__file__).parent / "src"))