Support LIVE exchange funds and perp margin mode.

Hide sim equity when LIVE is selected; OKX funds bar uses exchange balances; add cross/isolated for perp only (options stay cash).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-29 19:57:09 +08:00
parent 50a4540aaf
commit c6e8f6fe1e
12 changed files with 134 additions and 24 deletions
+2
View File
@@ -68,6 +68,8 @@ class Settings(BaseSettings):
live_order_interval_sec: float = 1.0 # LIVE 私有下单/查单最小间隔(秒)
skip_weekends: bool = True # 上海时区周六日禁止新开仓(已有仓仍可平)
leverage: float = 3.0 # 永续杠杆
# 永续保证金模式:cross=全仓(默认)| isolated=逐仓;期权仍固定 cashOKX 逐仓/现金)
perp_margin_mode: str = "cross"
min_option_hours: float = 12.0 # 期权最小剩余小时
min_option_leverage: float = 100.0 # 现价/卖一权利金 下限
atm_open_offset_enabled: bool = False # 开仓 ATM 偏差限制开关(默认关)