移除全部对冲计划模块:crypto_okx 改为币本位单独期权执行机。
交易模式锁定 options;okx_trade_mode / 到期盈亏迁入 options;保留期权/桥/关键位/企微与中控预留快照口径。恢复点:backup/before-remove-hedge 与 tag backup-before-remove-hedge-20260930。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -28,15 +28,12 @@ def build_options_hub_snapshot(cfg: dict[str, Any]) -> dict[str, Any]:
|
||||
try:
|
||||
conn = cfg["get_db"]()
|
||||
try:
|
||||
from lib.hedge_plan.hedge_plan_db import active_options_targets_by_inst
|
||||
from lib.options.options_profit_exit_lib import profit_exit_by_inst
|
||||
from lib.options.options_target_lib import list_active_targets, list_closing_targets, targets_by_inst
|
||||
|
||||
target_monitors = list_active_targets(conn) + list_closing_targets(conn)
|
||||
tgt_map = targets_by_inst(conn)
|
||||
hedge_target_map = active_options_targets_by_inst(conn)
|
||||
profit_exit_map = profit_exit_by_inst(conn)
|
||||
target_monitors.extend(hedge_target_map.values())
|
||||
for pe in profit_exit_map.values():
|
||||
if pe.get("profit_exit_enabled"):
|
||||
target_monitors.append(
|
||||
@@ -59,12 +56,6 @@ def build_options_hub_snapshot(cfg: dict[str, Any]) -> dict[str, Any]:
|
||||
p["profit_exit_mult"] = pe.get("profit_exit_mult")
|
||||
p["profit_exit_state"] = pe.get("profit_exit_state")
|
||||
p["profit_exit_required_recycle"] = pe.get("required_recycle")
|
||||
hedge_target = hedge_target_map.get(str(p.get("inst_id") or ""))
|
||||
if hedge_target:
|
||||
p["hedge_plan_target"] = hedge_target
|
||||
if not mon:
|
||||
# 中控卡片共用 target_index 只读展示;实际平仓仍由对冲计划监控处理。
|
||||
p["target_index"] = hedge_target.get("target_index")
|
||||
try:
|
||||
from lib.instance.instance_dashboard_lib import (
|
||||
_format_options_target,
|
||||
|
||||
Reference in New Issue
Block a user