Add HEDGE_PO_MODE instance modes with shared sim/live path.

Lock one mode per instance/subaccount, cross-asset BTC option/ETH perp sizing, combo-U exit, and ship docs/tests/audit.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-14 20:05:25 +08:00
parent ab7a2309ad
commit 5d161b4220
18 changed files with 1215 additions and 115 deletions
+7
View File
@@ -109,6 +109,8 @@ HOT_RELOAD_EXACT = frozenset({
"MAX_ACTIVE_HEDGE_PLANS",
"HEDGE_PLAN_LIVE_ORDER",
"HEDGE_PLAN_OPTION_PRIMARY",
"HEDGE_PO_MODE",
"HEDGE_CROSS_NOTIONAL_K",
"HEDGE_PLAN_OPEN_ORDER",
"HEDGE_PLAN_ON_PERP_SL_CLOSE_OPTIONS",
"HEDGE_PLAN_ON_PERP_TP_CLOSE_OPTIONS",
@@ -177,6 +179,11 @@ SELECT_OPTIONS: dict[str, tuple[tuple[str, str], ...]] = {
("true", "以期权为主"),
("false", "保险模式"),
),
"HEDGE_PO_MODE": (
("eth", "ETH永期(期权+永续同ETH)"),
("btc", "BTC永期(期权+永续同BTC)"),
("btc_eth", "跨币(BTC期权+ETH永续)"),
),
"SIM_DEFAULT_MODE": (
("sim", "模拟盘"),
("live", "实盘"),