Add hub TP profit field, 2-decimal options PnL, and exchange mark price display.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-08 17:22:26 +08:00
parent e3e53ff7f5
commit 279648de56
8 changed files with 58 additions and 7 deletions
+6
View File
@@ -355,6 +355,12 @@ def apply_order_price_display_fields(
payload["take_profit_display"] = (
format_price_fn(symbol, disp_tp) if disp_tp is not None else ""
)
mark_raw = mark_price if mark_price is not None else None
if mark_raw is not None and format_price_fn is not None and symbol is not None:
try:
payload["exchange_mark_price_display"] = format_price_fn(symbol, float(mark_raw))
except (TypeError, ValueError):
payload["exchange_mark_price_display"] = None
return payload