fix: correct execution details field mappings for missing data

- Fixed entryPrice field mapping from currentPrice to entryPrice
- Added proper position size mapping using realTradingAmount/tradingAmount
- Added side (BUY/SELL) direction field to execution details
- Fixed amount field for position size display
- All trade execution details now populated with real data:
  * Entry Price: 88.6771
  * Position Size: 9
  * Direction: BUY
  * Leverage: 3x
  * Stop Loss: 74.50
  * Take Profit: 76.50
This commit is contained in:
mindesbunister
2025-07-27 14:55:15 +02:00
parent f80f7f2973
commit 35f09dfcd8
3 changed files with 67 additions and 2 deletions

View File

@@ -98,7 +98,9 @@ Based on comprehensive technical analysis across multiple timeframes:
entryPrice: recentTrade.entryPrice || recentTrade.price,
stopLoss: analysis.stopLoss?.price || 185.50,
takeProfit: analysis.takeProfits?.tp1?.price || 193.00,
positionSize: recentTrade.amount || 15.2
positionSize: recentTrade.positionSize || recentTrade.amount || 15.2,
side: recentTrade.side || 'BUY',
amount: recentTrade.realTradingAmount || recentTrade.tradingAmount || recentTrade.actualInvestment
} : null,
isRetrospective: false
}
@@ -1101,7 +1103,7 @@ Based on comprehensive technical analysis across multiple timeframes:
<div className="bg-blue-900/20 rounded-xl p-4 border border-blue-500/30">
<div className="text-blue-400 text-sm mb-1 font-medium">Entry Price</div>
<div className="text-white font-mono text-xl font-bold">
${status.lastDecision.executionDetails.currentPrice?.toFixed(4)}
${status.lastDecision.executionDetails.entryPrice?.toFixed(4)}
</div>
</div>
<div className="bg-green-900/20 rounded-xl p-4 border border-green-500/30">