Files
qihuo/docs/TRADING.md
T
dekun 6e423eebfb 接入 SimNow 模拟盘与期货下单、策略及品种推荐功能。
新增 vnpy CTP 桥接、以损定仓/固定张数、趋势回调与滚仓策略、按资金推荐品种及交易风控;模拟盘走 SimNow,实盘预留期货公司配置。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-24 10:04:37 +08:00

41 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 期货下单与策略交易
## 两种交易通道
| 设置 | 实际连接 | 资金 |
|------|----------|------|
| **模拟盘** | **SimNow**vnpy → CTP 仿真前置) | SimNow 账户权益 |
| **实盘** | **期货公司 CTP**(后期配置 `CTP_LIVE_*` | 柜台权益 |
已移除「本地 SQLite 假撮合」;模拟盘与实盘均走 **vnpy_ctp**,仅 `.env` 前置与账号不同。
## 首次使用 SimNow
1. 在 [SimNow](https://www.simnow.com.cn/) 注册仿真账号
2. 复制 `.env.example``.env`,填写 `SIMNOW_USER``SIMNOW_PASSWORD`
3. 核对 SimNow 官网最新的 **7×24 或交易时段** 前置地址
4. `pip install vnpy vnpy_ctp`
5. 启动程序 → **期货下单** → 点击 **连接 CTP**
6. 连接成功后,权益、持仓、下单均来自 SimNow
## 参考资金
系统设置中的「参考资金」仅在 **CTP 未连接** 时用于品种推荐与以损定仓估算;连接 SimNow 后自动改用柜台权益。
## 导航
| 页面 | 路径 |
|------|------|
| 品种推荐 | `/recommend` |
| 期货下单 | `/trade` |
| 策略交易 | `/strategy` |
| 策略记录 | `/strategy/records` |
## API
| 接口 | 说明 |
|------|------|
| `POST /api/ctp/connect` | 按当前模式连接 SimNow 或实盘 CTP |
| `GET /api/ctp/status` | 连接状态与缺失配置项 |
| `POST /api/trade/order` | 限价报单(需已连接 CTP) |