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
+19
View File
@@ -175,6 +175,25 @@ export type PlanState = {
status: string;
}[];
ledger: { equity: number; available: number; reserved: number };
mode?: "SIM" | "LIVE";
sim?: boolean;
live_ready?: boolean;
live_ready_reason?: string;
};
export type RuntimeSettings = {
mode: "SIM" | "LIVE";
exchange: string;
okx_configured: boolean;
binance_configured: boolean;
okx_api_key_masked: string | null;
okx_api_secret_masked: string | null;
okx_api_passphrase_masked: string | null;
binance_api_key_masked: string | null;
binance_api_secret_masked: string | null;
live_ready: boolean;
live_ready_reason: string;
sim: boolean;
};
export type StrategySettings = {