下线永续监控与 USDC 期权,仅保留币本位期权路径。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-07 12:32:01 +08:00
parent 1a4eb15109
commit 7c5a6e25b2
10 changed files with 1581 additions and 2228 deletions
+7 -7
View File
@@ -35,11 +35,10 @@ def is_coin_margin_mode(raw: Any = None) -> bool:
def inst_family_for_underlying(underlying: str, *, margin_mode: str | None = None) -> str:
"""仅币本位期权族 {U}-USD;USD_UM 已下线."""
del margin_mode
u = (underlying or "ETH").strip().upper() or "ETH"
mode = normalize_options_margin_mode(margin_mode)
if mode == MODE_COIN:
return f"{u}-USD"
return f"{u}-USD_UM"
return f"{u}-USD"
def margin_mode_from_inst_id(inst_id: str) -> str:
@@ -55,9 +54,10 @@ def margin_mode_from_inst_id(inst_id: str) -> str:
def premium_ccy_for_mode(margin_mode: str, underlying: str = "ETH") -> str:
if normalize_options_margin_mode(margin_mode) == MODE_COIN:
return (underlying or "ETH").strip().upper() or "ETH"
return "USDC"
"""币本位权利金为标的币;历史 USDC 行(margin_mode=usdc)仍标 USDC."""
if str(margin_mode or "").strip().lower() == MODE_USDC:
return "USDC"
return (underlying or "ETH").strip().upper() or "ETH"
def spot_quote_inst_id(underlying: str) -> str: