Files
qihuo/README.md
T
dekun 7b60f0dce5 Update documentation to match current product features.
Rewrite module docs for order monitor, CTP sync, and stats; remove obsolete simulated-position and UI descriptions.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 02:08:01 +08:00

80 lines
2.7 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.
# 国内期货交易监控复盘系统
基于 Flask 的国内期货 **CTP 下单 + 监控 + 复盘 + 统计** Web 应用。模拟盘连接 SimNow,实盘连接期货公司 CTP;支持关键位/计划提醒、交易记录同步、资金曲线、品种推荐与企业微信推送。
## 文档
| 文档 | 说明 |
|------|------|
| **[功能说明](docs/FEATURES.md)** | 各模块功能、页面路径、数据库与后台任务 |
| **[部署文档](docs/DEPLOY.md)** | 一键部署、更新、PM2、故障排查 |
| **[SimNow 接入](docs/SIMNOW.md)** | 仿真账号注册与 CTP 前置 |
| **[交易与策略](docs/TRADING.md)** | 下单、持仓、品种推荐、策略 API |
| **[手续费与导航](docs/FEES.md)** | CTP 费率同步、导航开关 |
## 功能一览
| 模块 | 路径 | 说明 |
|------|------|------|
| **下单监控**(默认首页) | `/positions` | CTP 连接、期货下单、当前持仓、品种推荐 |
| **策略交易** | `/strategy` | 趋势回调 / 顺势加仓(可导航开关) |
| **开单计划** | `/plans` | 当日决策区间、触发推送(可开关) |
| **关键位监控** | `/keys` | 箱体/阻力支撑突破提醒 |
| **行情 K 线** | `/market` | 多周期 K 线(可开关) |
| **交易记录与复盘** | `/records` | 资金曲线、CTP 成交同步、复盘上传 |
| **统计分析** | `/stats` | 汇总指标 + 多维度分项统计 |
| **手续费配置** | `/fees` | CTP / 本地费率(可开关) |
| **品种简介** | `/contract` | 合约规格查询(可开关) |
| **系统设置** | `/settings` | 交易模式、CTP、计仓、微信、主题 |
登录后默认进入 **下单监控**;刷新当前页不会跳转,仅访问根路径 `/` 或新登录时进入默认页。
## 快速开始
**服务器(Ubuntu**
```bash
cd /opt/qihuo && bash deploy.sh
# 访问 http://<IP>:6600
```
**更新**
```bash
cd /opt/qihuo
git fetch origin && git reset --hard origin/main
source venv/bin/activate && pip install -r requirements.txt
pm2 restart qihuo
```
详见 [部署文档](docs/DEPLOY.md)。
**本地开发**
```bash
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
cp .env.example .env
python app.py
```
## 品种与行情
- 合约代码:**同花顺格式**`ag2606``SR609``IF2606`),中文联想匹配主力
- 行情:默认 **新浪财经**;机构用户可配置同花顺 iFinD token
## 环境要求
- Python 3.10+vnpy_ctp
- PM2(生产部署)
- 网络:新浪行情、Git 仓库、SimNow/CTP 前置(见部署文档)
## 仓库
https://git.bz121.com/dekun/qihuo.git
## License
Private / 个人使用