Initial CoinOX instance: coin-margined options + USDT hedge.

Forked from crypto_monitor OKX instance (copy-only). Keeps standalone options, perp-options and options-options hedge; drops standalone perp entrypoints; forces coin margin; adds sim wallets; default port 5010.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-14 00:18:40 +08:00
commit 88b7fb7a0a
381 changed files with 104628 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
# CoinOX(币本对冲)
OKX **币本位期权** + **U 本位永续对冲** 独立实例。
远程仓库:<https://git.bz121.com/dekun/CoinOX.git>
## 产品范围
| 保留 | 说明 |
|------|------|
| 单独期权 | 仅币本位(USDT→买币→开期权) |
| 永期对冲 | 币本位期权腿 + USDT 永续腿 |
| 期期对冲 | 双腿币本位期权 |
| 模拟资金 | 默认 `sim`,本地钱包撮合 |
| 不提供 | 说明 |
|--------|------|
| 单独永续下单 | `/trade` 已重定向 |
| 关键位自动开仓 | `/key_monitor` 已重定向 |
| 策略趋势/滚仓 | 未安装 |
| USDC 期权 | 已固定币本位 |
源仓 `crypto_monitor` **只读复制**,不回改源仓。中控二期再做。
## 快速开始
```bash
cd /path/to/CoinOX # 或 E:\仓库\okx对冲
python -m venv .venv
# Windows: .venv\Scripts\activate
pip install -r requirements.txt
copy .env.example .env # 编辑密钥;默认 SIM_DEFAULT_MODE=sim
python app.py
```
默认端口见 `.env` 的 `APP_PORT`(模板为 `5010`,避免与旧 OKX 实例冲突)。
## 环境要点
- `OKX_OPTIONS_MARGIN_MODE=coin`(固定)
- `OKX_TRADE_MODE=options|perp_options|options_options`
- `SIM_DEFAULT_MODE=sim` / `live`
- `SIM_INITIAL_EQUITY_USDT=10000`
## 风险
实盘须自行确认 API 权限与资金;默认模拟盘,切 `live` 前请核对。