소스 검색

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 1 주 전
부모
커밋
1cd72b8630
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  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"))