期货数据统一平台,目前对接tushare(未验证),akshare(已简单测试,含防封措施),2026年5月9日创立
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Lxy e0b8305406
feat: 初始化代码
3 weeks ago
backend feat: 初始化代码 3 weeks ago
docs feat: 初始化代码 3 weeks ago
frontend feat: 初始化代码 3 weeks ago
screenshots feat: 初始化代码 3 weeks ago
.env.example feat: 初始化代码 3 weeks ago
.gitignore feat: 初始化代码 3 weeks ago
Dockerfile.backend feat: 初始化代码 3 weeks ago
Dockerfile.frontend feat: 初始化代码 3 weeks ago
README.md feat: 初始化代码 3 weeks ago
docker-compose.yml feat: 初始化代码 3 weeks ago

README.md

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

期货统一数据平台

期货行情统一数据平台对接多个数据源Tushare/CTP等提供统一的数据出口。

功能

  • 数据源管理: 可配置启用/禁用的数据源,优先级管理
  • 历史K线: 日K/周K/60m/30m/15m/5m 数据存储与查询
  • 合约管理: 合约信息同步与查询
  • 管理后台: 数据源监控、接口测试、K线展示
  • RESTful API: 统一的数据接口供其他系统调用

快速开始

1. 配置环境变量

cp .env.example .env
# 编辑 .env填入你的 Tushare Token

2. Docker 启动

docker compose up -d --build

启动后访问:

3. 初始配置

  1. 打开 http://localhost:3000
  2. 进入"数据源监控"页面
  3. 点击 tushare 行的"配置"按钮,填入你的 Tushare Token
  4. 点击"测试连接"确认
  5. 开启"启用"开关

项目结构

├── backend/                 # 后端 (FastAPI + SQLAlchemy)
│   ├── app/
│   │   ├── main.py          # 入口 & API路由
│   │   ├── config.py        # 配置
│   │   ├── database.py      # 数据库连接
│   │   ├── models/          # 数据库模型
│   │   ├── schemas/         # Pydantic 模型
│   │   ├── services/        # 业务逻辑
│   │   │   ├── datasource/  # 数据源适配器
│   │   │   ├── kline_service.py
│   │   │   └── contract_service.py
│   │   └── api/
│   └── requirements.txt
├── frontend/                # 前端 (Vue3 + Element Plus)
│   ├── src/
│   │   ├── views/           # 页面
│   │   └── api/             # API调用
│   └── package.json
├── docker-compose.yml
└── .env

API 接口

合约

  • GET /api/v1/contracts - 合约列表
  • GET /api/v1/contracts/{symbol} - 合约详情
  • POST /api/v1/contracts/sync - 同步合约

K线

  • GET /api/v1/kline?symbol=rb2401&period=daily&limit=100 - 查询K线
  • POST /api/v1/kline/sync - 同步K线数据

数据源

  • GET /api/v1/datasources - 数据源列表
  • PUT /api/v1/datasources/{name} - 更新配置
  • POST /api/v1/datasources/{name}/test - 测试连接

技术栈

层次 技术
后端 Python / FastAPI / SQLAlchemy
数据库 PostgreSQL + TimescaleDB
缓存 Redis
前端 Vue3 / Element Plus / ECharts
部署 Docker Compose