Sync displayed entry price from CTP exchange position average.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-30 09:19:27 +08:00
parent c8fef65de7
commit f41276806e
3 changed files with 14 additions and 15 deletions
+3
View File
@@ -832,12 +832,15 @@
if (isPhoneLayout() && posMobileCache[key]) {
var cached = posMobileCache[key];
if (q.mark_price != null) cached.current_price = q.mark_price;
if (q.entry_price != null) cached.entry_price = q.entry_price;
if (q.float_pnl != null) cached.float_pnl = q.float_pnl;
}
var row = findPosRow(key);
if (!row) return;
var entryEl = row.querySelector('.dash-p-entry');
var markEl = row.querySelector('.dash-p-mark');
var pnlEl = row.querySelector('.dash-p-pnl');
if (entryEl && q.entry_price != null) entryEl.textContent = fmtNum(q.entry_price);
if (markEl && q.mark_price != null) markEl.textContent = fmtNum(q.mark_price);
if (pnlEl && q.float_pnl != null) {
pnlEl.textContent = fmtPnl(q.float_pnl);