feat: add OKX options module with dual API, USDT/USDC convert, and docs
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -135,6 +135,27 @@ def build_instance_settings_view(
|
||||
}
|
||||
)
|
||||
|
||||
if (exchange_key or "").strip().lower() == "okx" and _env_bool("OKX_OPTIONS_ENABLED", False):
|
||||
opt_key = (os.getenv("OKX_OPTIONS_API_KEY") or "").strip()
|
||||
sections.append(
|
||||
{
|
||||
"title": "期权账户(主账户)",
|
||||
"rows": [
|
||||
_row("期权模块", "已启用"),
|
||||
_row(
|
||||
"期权 API",
|
||||
f"已配置(…{opt_key[-4:]})" if len(opt_key) >= 4 else "未配置",
|
||||
),
|
||||
_row("单笔权利金上限", f"{_env_float('OKX_OPTIONS_TRADE_BUDGET_USDC', 10):g} USDC"),
|
||||
_row(
|
||||
"资金说明",
|
||||
"资金账户 USDT 兑换 USDC 后划转到交易账户",
|
||||
"期权页操作;与永续子账户资金分开",
|
||||
),
|
||||
],
|
||||
}
|
||||
)
|
||||
|
||||
policy_note = ""
|
||||
if trade_policy and getattr(trade_policy, "badge_text", ""):
|
||||
policy_note = str(trade_policy.badge_text)
|
||||
|
||||
Reference in New Issue
Block a user