VeighNa框架的TuShare数据服务接口
说明
基于tushare模块的1.4.21版本开发,支持以下中国金融市场的K线数据:
- 期货:
- CFFEX:中国金融期货交易所
- SHFE:上海期货交易所
- DCE:大连商品交易所
- CZCE:郑州商品交易所
- INE:上海国际能源交易中心
- 股票:
- SSE:上海证券交易所
- SZSE:深圳证券交易所
- BSE:北京证券交易所
注意:需要使用相应的数据服务权限,可以通过该页面注册使用。
数据使用事项
tushare数据源期货数据中,第一条夜盘k线数据是集合竞价数据,用户可以根据自己需求进行过滤或者合并。
安装
安装环境推荐基于4.0.0版本以上的【VeighNa Studio】。
直接使用pip命令:
pip install vnpy_tushare
或者下载源代码后,解压后在cmd中运行:
pip install .
使用
在VeighNa中使用TuShare时,需要在全局配置中填写以下字段信息:
| 名称 | 含义 | 必填 | 举例 |
|---|---|---|---|
| datafeed.name | 名称 | 是 | tushare |
| datafeed.username | 用户名 | 否 | token |
| datafeed.password | 密码 | 是 | c3a110417f08f26d2c221edc0c50d4a8a5001502eea89cf5 |
单元测试
单元测试代码目录为./tests/test_*.py
# 指定文件执行单元测试
python -m unittest tests\test_your_file_name.py
# 全量执行
python -m unittest
Metadata
Release files for vnpy_tushare 1.4.21.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| vnpy_tushare-1.4.21.0.tar.gz | 6.9 kB | Without provenance | Details for vnpy_tushare-1.4.21.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vnpy_tushare-1.4.21.0-py3-none-any.whl | Python 3 | none | any | Details for vnpy_tushare-1.4.21.0-py3-none-any.whl |
Total release size: 13.7 kB
Security for vnpy_tushare 1.4.21.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.