From 5a5ce5ada431049ec8dfaf952853e2092b6c879d Mon Sep 17 00:00:00 2001 From: aaron <> Date: Mon, 23 Feb 2026 00:14:06 +0800 Subject: [PATCH] 1 --- frontend/real-trading.html | 109 ++++++++++++++++++++++++++----------- 1 file changed, 77 insertions(+), 32 deletions(-) diff --git a/frontend/real-trading.html b/frontend/real-trading.html index 00e5942..aef3868 100644 --- a/frontend/real-trading.html +++ b/frontend/real-trading.html @@ -496,7 +496,19 @@
| 交易对 | +方向 | +持仓量 | +入场价 | +标记价 | +杠杆 | +保证金 | +未实现盈亏 | +盈亏比例 | +强平价格 | +||
|---|---|---|---|---|---|---|---|---|---|---|---|
| 交易对 | 方向 | 等级 | @@ -512,37 +524,63 @@|||||||||
| {{ order.symbol }} | -- - {{ order.side === 'long' ? '做多' : '做空' }} - - | -- - {{ order.signal_grade || 'D' }} - - | -${{ order.entry_price ? order.entry_price.toLocaleString() : '-' }} | -${{ order.current_price ? order.current_price.toLocaleString() : '-' }} | -${{ order.quantity ? order.quantity.toLocaleString() : '-' }} | -{{ order.leverage || 1 }}x | -${{ order.stop_loss ? order.stop_loss.toLocaleString() : '-' }} | -${{ order.take_profit ? order.take_profit.toLocaleString() : '-' }} | -- - {{ order.pnl >= 0 ? '+' : '' }}${{ order.pnl.toFixed(2) }} - - - - | -- - {{ formatStatus(order.status) }} - - | -{{ formatTime(order.created_at) }} | -
| {{ formatSymbol(pos.symbol) }} | ++ + {{ pos.side === 'long' ? '做多' : '做空' }} + + | +{{ pos.contracts || '0' }} | +${{ pos.entryPrice ? parseFloat(pos.entryPrice).toLocaleString() : '-' }} | +${{ pos.markPrice ? parseFloat(pos.markPrice).toLocaleString() : '-' }} | +{{ pos.leverage }}x | +${{ pos.initialMargin ? parseFloat(pos.initialMargin).toFixed(2) : '-' }} | ++ {{ parseFloat(pos.unrealizedPnl || 0) >= 0 ? '+' : '' }}${{ parseFloat(pos.unrealizedPnl || 0).toFixed(2) }} + | ++ {{ (pos.percentage || 0).toFixed(2) }}% + | +${{ pos.liquidationPrice ? parseFloat(pos.liquidationPrice).toLocaleString(undefined, {minimumFractionDigits: 2, maximumFractionDigits: 2}) : '-' }} | +||
| {{ order.symbol }} | ++ + {{ order.side === 'long' ? '做多' : '做空' }} + + | ++ + {{ order.signal_grade || 'D' }} + + | +${{ order.entry_price ? order.entry_price.toLocaleString() : '-' }} | +${{ order.current_price ? order.current_price.toLocaleString() : '-' }} | +${{ order.quantity ? order.quantity.toLocaleString() : '-' }} | +{{ order.leverage || 1 }}x | +${{ order.stop_loss ? order.stop_loss.toLocaleString() : '-' }} | +${{ order.take_profit ? order.take_profit.toLocaleString() : '-' }} | ++ + {{ order.pnl >= 0 ? '+' : '' }}${{ order.pnl.toFixed(2) }} + + - + | ++ + {{ formatStatus(order.status) }} + + | +{{ formatTime(order.created_at) }} | +