实现OKX单笔期权币本位与USDT桥复利(中控只读,不改Gate)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -123,9 +123,16 @@ def _format_options_position_detail_line(p: dict) -> str:
|
||||
if sheets is None:
|
||||
sheets = "?"
|
||||
parts = [f"期权 {inst} {label}", f"来源{src}", f"张数{sheets}"]
|
||||
mode_lab = p.get("margin_mode_label") or ("币本位" if p.get("margin_mode") == "coin" else "")
|
||||
if mode_lab:
|
||||
parts.append(f"本位{mode_lab}")
|
||||
paid = _safe_float(p.get("premium_paid"))
|
||||
if paid is not None:
|
||||
parts.append(f"权利金{paid:g}U")
|
||||
ccy = p.get("premium_ccy") or ("ETH" if p.get("margin_mode") == "coin" else "USDC")
|
||||
if str(ccy).upper() == "USDC":
|
||||
parts.append(f"权利金{paid:g}U")
|
||||
else:
|
||||
parts.append(f"权利金{paid:g}{ccy}")
|
||||
net: Optional[float] = None
|
||||
try:
|
||||
from lib.options.options_positions_lib import net_pnl_from_display_row
|
||||
|
||||
Reference in New Issue
Block a user