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:
@@ -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
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user