Commit Graph

3 Commits

Author SHA1 Message Date
e3f34cd57c refactor: ORM模型重构 + 服务管理器 + QMT数据下载器
主要变更:
- 重构 models: 统一使用 SQLAlchemy ORM,分离 Pydantic schemas
- 新增 service_manager: 服务启动/停止统一管理
- 新增 data_downloader: 基于 xtquant 的数据下载服务
- 简化 main.py: 只启动必要服务 (Redis, Database)
- 更新 .gitignore: 排除 xtquant 数据目录
2025-12-09 17:32:01 +08:00
b992dc3289 fix: 修复服务启动问题
- 修复 core_service/services/__init__.py 编码错误
- 修复 strategy_engine 数据库连接失败导致启动崩溃
- 修复 strategy_executor 加载配对时数据库不可用的问题
- 优化服务管理页面一键启动/停止逻辑
- 仪表盘快捷按钮连接到服务管理功能
- 更新数据库配置为 qtrade_stock_data
2025-12-09 01:32:51 +08:00
085427959c feat: Phase 4-7 - Core Service, Strategy Engine, QMT Adapter, Tests
Phase 4: Core Service (port 8010)
- Pairing management (symbol-strategy pairs)
- Order service with Redis pub/sub
- Position and balance tracking

Phase 5: Strategy Engine (port 8030)
- BaseStrategy abstract class
- Strategy registry and executor
- Built-in strategies: Grid, MA Cross, Dual MA
- Signal manager with Redis integration

Phase 6: QMT Adapter (port 8040)
- XtQuant SDK wrapper with simulation mode
- Order executor listening to Redis channels
- Quote pusher and account syncer

Phase 7: Testing & Documentation
- Pytest fixtures for all services
- Unit tests for models and strategies
- Windows startup scripts
2025-12-09 00:36:27 +08:00