fix期权下单默认按可用余额打满;持仓上限/缓冲/门控秒数默认值调整。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-09 00:46:54 +08:00
parent 549253440a
commit ed4c650e4b
9 changed files with 38 additions and 35 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ def _close_recycle_mult(premium_ccy: str) -> float:
def _close_hold_seconds() -> float:
return _env_float("OKX_OPTIONS_CLOSE_HOLD_SECONDS", 120.0)
return _env_float("OKX_OPTIONS_CLOSE_HOLD_SECONDS", 20.0)
def _close_net_pnl_min_usdt() -> float:
@@ -36,7 +36,7 @@ def _close_net_pnl_min_usdt() -> float:
# 兼容旧引用
CLOSE_RECYCLE_MIN_MULT = _env_float("OKX_OPTIONS_CLOSE_RECYCLE_MULT", 2.0)
CLOSE_RECYCLE_HOLD_SECONDS = _env_float("OKX_OPTIONS_CLOSE_HOLD_SECONDS", 120.0)
CLOSE_RECYCLE_HOLD_SECONDS = _env_float("OKX_OPTIONS_CLOSE_HOLD_SECONDS", 20.0)
_lock = threading.Lock()
# inst_id -> gate state