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
@@ -54,7 +54,7 @@ def attach_options_templates(app: Flask, repo_root: str) -> None:
def install_options_trading(app: Flask, repo_root: str, app_module: Any) -> None:
enabled = _env_bool("OKX_OPTIONS_ENABLED", False)
enabled = _env_bool("OKX_OPTIONS_ENABLED", True)
attach_options_templates(app, repo_root)
cfg = _build_cfg(app_module)
app.extensions["options_cfg"] = cfg
@@ -95,7 +95,7 @@ def _build_cfg(app_module: Any) -> dict[str, Any]:
)
return {
"enabled": _env_bool("OKX_OPTIONS_ENABLED", False),
"enabled": _env_bool("OKX_OPTIONS_ENABLED", True),
"get_db": app_module.get_db,
"login_required": app_module.login_required,
"exchange_options": getattr(app_module, "exchange_options", None),