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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user