Enable options by default and allow full sim trading without OKX API keys.

Relax hedge start gates in sim, route perp open/close through sim broker, and mount strategy templates for records pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-14 09:26:38 +08:00
parent d4b970cfd5
commit b4d62ea0a6
8 changed files with 445 additions and 352 deletions
+2 -2
View File
@@ -160,7 +160,7 @@ def build_instance_settings_view(
}
)
if (exchange_key or "").strip().lower() == "okx" and _env_bool("OKX_OPTIONS_ENABLED", False):
if (exchange_key or "").strip().lower() == "okx" and _env_bool("OKX_OPTIONS_ENABLED", True):
api_key = (os.getenv("OKX_API_KEY") or "").strip()
sections.append(
{
@@ -194,7 +194,7 @@ def build_instance_settings_view(
"data_export_version": int(data_export_version),
"show_transfer": (exchange_key or "").strip().lower() in ("gate", "binance", "okx"),
"options_settings_enabled": (exchange_key or "").strip().lower() == "okx"
and _env_bool("OKX_OPTIONS_ENABLED", False),
and _env_bool("OKX_OPTIONS_ENABLED", True),
"auto_transfer_enabled": auto_transfer_on,
"auto_transfer_bj_hour": _env_int("AUTO_TRANSFER_BJ_HOUR", 8),
"auto_transfer_amount": _env_float("AUTO_TRANSFER_AMOUNT", 30),