diff --git a/deploy/profile-scripts/price_monitor.py b/deploy/profile-scripts/price_monitor.py index 5eb44b09..a9105ff6 100644 --- a/deploy/profile-scripts/price_monitor.py +++ b/deploy/profile-scripts/price_monitor.py @@ -463,6 +463,9 @@ def refresh_data_prices(): if price_val > 0: h['price'] = round(price_val, 2) h['change_pct'] = float(change_pct) if change_pct else 0 + # 重新计算 market_value 保持与 price 同步 + shares = h.get('shares', 0) + h['market_value'] = round(price_val * shares, 2) db_holdings.append(h) # ── 写 holdings 表 ──