Merge OKX dual APIs into one OKX_API_* account for perp and options.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-05 21:28:33 +08:00
parent 22e6b68e6d
commit 09a763e47d
26 changed files with 166 additions and 473 deletions
+8 -6
View File
@@ -104,12 +104,14 @@ def options_funding_label(
funding_usdc: float | None,
funding_usdt: float | None = None,
) -> str:
parts: list[str] = []
if funding_usdc is not None and float(funding_usdc) > 0:
parts.append(f"{float(funding_usdc):.2f} USDC")
if funding_usdt is not None and float(funding_usdt) > 0:
parts.append(f"{float(funding_usdt):.2f} USDT")
return " · ".join(parts) if parts else ""
"""期权侧顶栏仅展示 USDC(USDT 归永续资金/交易账户).funding_usdt 参数保留兼容,忽略."""
_ = funding_usdt
if funding_usdc is None:
return ""
try:
return f"{float(funding_usdc):.2f} USDC"
except (TypeError, ValueError):
return ""
def total_funds_usdt(