Expose sim/live matching mode in env config UI.

Saving SIM_DEFAULT_MODE also switches runtime trading.mode immediately.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-14 18:14:17 +08:00
parent 56618a6655
commit 919ac70bc2
5 changed files with 67 additions and 4 deletions
+5
View File
@@ -99,6 +99,7 @@ HOT_RELOAD_EXACT = frozenset({
"OKX_OPTIONS_TRADE_BUDGET_USDC",
"OKX_OPTIONS_BUDGET_BUFFER",
"OKX_TRADE_MODE",
"SIM_DEFAULT_MODE",
"MAX_ACTIVE_HEDGE_PLANS",
"HEDGE_PLAN_LIVE_ORDER",
"HEDGE_PLAN_OPTION_PRIMARY",
@@ -159,6 +160,10 @@ SELECT_OPTIONS: dict[str, tuple[tuple[str, str], ...]] = {
("perp_options", "永期对冲"),
("options_options", "期期对冲"),
),
"SIM_DEFAULT_MODE": (
("sim", "模拟(sim)"),
("live", "实盘(live)"),
),
"HEDGE_PLAN_OPTION_PRIMARY": (
("true", "以期权为主"),
("false", "保险模式"),