|
@@ -99,6 +99,9 @@ class PositionsCommands(InfoCommandsBase):
|
|
|
logger.warning(f"Could not parse position_opened_at: {position_opened_at_str} for {symbol}")
|
|
|
duration_str = "Error"
|
|
|
|
|
|
+ # Get exchange data for this position (used for ROE and mark price)
|
|
|
+ exchange_data = exchange_data_by_symbol.get(base_asset)
|
|
|
+
|
|
|
# Get price data with defaults - prioritize live exchange data
|
|
|
mark_price = entry_price # Default to entry price
|
|
|
|
|
@@ -125,7 +128,6 @@ class PositionsCommands(InfoCommandsBase):
|
|
|
|
|
|
# Get ROE from live exchange data (much more accurate)
|
|
|
roe_percentage = 0.0
|
|
|
- exchange_data = exchange_data_by_symbol.get(base_asset)
|
|
|
if exchange_data and exchange_data.get('returnOnEquity') is not None:
|
|
|
try:
|
|
|
# Convert from decimal (0.118) to percentage (11.8%)
|