Add SIM/LIVE switch with API keys saved to .env and OKX live executor.

Enable settings UI for mode/keys, gate strategy start when LIVE is not ready, and stop PM2 from forcing MODE=SIM.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-26 21:08:39 +08:00
parent c2113b1a57
commit e666230d0b
19 changed files with 1367 additions and 33 deletions
+2 -1
View File
@@ -45,8 +45,9 @@ async def lifespan(app: FastAPI):
try:
await session.start()
logger.info(
"exchange=%s strategy session started (SIM)",
"exchange=%s strategy session started mode=%s",
settings.exchange,
"SIM" if get_settings().is_sim else "LIVE",
)
except Exception:
logger.exception("strategy session failed to start")