Fix instance dashboard order PnL columns showing empty dashes.

Compute float_pnl and tp_profit from mark/entry/contracts using each exchange contract size during dashboard enrich.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-06 14:12:57 +08:00
parent 993189ce13
commit 75a4175522
5 changed files with 104 additions and 17 deletions
+3 -1
View File
@@ -9446,7 +9446,9 @@ register_trade_records_api(
def _dashboard_enrich_orders(items):
from lib.instance.instance_dashboard_lib import enrich_order_items_with_marks
return enrich_order_items_with_marks(items, get_price=get_price)
return enrich_order_items_with_marks(
items, get_price=get_price, get_contract_size=get_contract_size
)
from lib.instance.instance_dashboard_register import register_instance_dashboard_routes