|
|
e04da0f51d
|
fix: 修复 Pylance 类型检查错误
修复内容:
- 移除未使用的导入 (database.py, logger.py, main.py, market.py, trading.py, kline.py, kline_service.py, data_player.py)
- 修复字典键重复问题 (trading.py, account.py, backtest.py)
- 修复 SQL 执行类型错误,使用 text() 包装 (health.py, kline.py)
- 修复 Redis 客户端类型推断问题 (redis_client.py)
- 添加 pyright 忽略指令和 type: ignore
- 添加 ping(), smembers(), scan_iter() 等方法
- 修复 lpop/rpop/sismember 返回类型
- 修复 data_player.py 中的 params 类型注解
|
2025-12-08 23:46:08 +08:00 |
|
|
|
883d7e6549
|
feat: 阶段3 Data Service 数据服务
完成数据服务模块:
- data_service/app.py: FastAPI 应用框架,端口 8020
- data_service/routes/: 路由模块
- health.py: 健康检查 /ping, /health
- market.py: 行情查询 /market/quote, /market/quotes, /market/snapshot
- kline.py: K线查询 /kline/history, /kline/latest, /kline/periods
- backtest.py: 回测控制 /backtest/start, /backtest/stop, /backtest/pause
- data_service/services/: 核心服务
- market_receiver.py: 行情接收器,订阅 Redis 频道接收 QMT 推送
- kline_service.py: K线服务,批量存储K线到分周期表
- data_player.py: 数据回放器,支持回测数据按时间回放
功能特性:
- 行情接收与分发 (Redis Pub/Sub)
- K线数据持久化 (按周期分表存储)
- 回测数据回放 (支持暂停/恢复/调速)
|
2025-12-08 23:24:08 +08:00 |
|