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
+3
View File
@@ -4,6 +4,8 @@
> 关联:[开发方案](./开发方案.md)、[商业化与授权方案](./商业化与授权方案.md)、[实盘策略说明](./实盘策略说明.md)
> 更新:2026-07-26
**运行模式**:设置页「运行模式」可切 **SIM / LIVE**;交易所 API 录入后写入服务器 `.env`(不回传明文)。LIVE 须二次确认输入 `LIVE`;当前 **OKX** 可真下单,币安仅存密钥。有持仓时不可切模式。
---
## 1. 策略一句话
@@ -334,3 +336,4 @@
| 2026-07-26 | 到期按内在价值结算(对齐实盘);紧急平仓仍用 max(买一,标记,内在价值) |
| 2026-07-26 | 明确两套目标平仓:双腿全平 / 远虚只平永续+期权归档到期;到期为未达标路径 |
| 2026-07-26 | 补充 §4.6:有仓钉持仓监控、空仓/仅残留跟新 ATM、残留列表与到期内在价值结算展示分工 |
| 2026-07-26 | 设置页 SIM/LIVE 切换;API 密钥落 `.env`;OKX LIVE 开平仓;币安密钥可存 |