feat期权标的白名单:可固定只显示 ETH 或 BTC。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-13 19:09:06 +08:00
parent 8d846794a2
commit 1835a79698
11 changed files with 215 additions and 13 deletions
+6 -1
View File
@@ -710,7 +710,12 @@ def options_header_balance_pack(
margin_mode = normalize_options_margin_mode()
except Exception:
margin_mode = "usdc"
underly = (os.getenv("OKX_OPTIONS_DEFAULT_UNDERLY") or "ETH").strip().upper() or "ETH"
try:
from lib.options.options_underly_lib import resolve_default_underly
underly = resolve_default_underly()
except Exception:
underly = (os.getenv("OKX_OPTIONS_DEFAULT_UNDERLY") or "ETH").strip().upper() or "ETH"
coin_key = "btc" if underly == "BTC" else "eth"
return {
"trading_usdc": _round(bal.get("trading_usdc")),