vnpy-tushare


Namevnpy-tushare JSON
Version 1.4.7.0 PyPI version JSON
download
home_pagehttps://www.vnpy.com
SummaryTushare datafeed for VeighNa quant trading framework.
upload_time2024-07-04 05:55:28
maintainerNone
docs_urlNone
authorXiaoyou Chen
requires_pythonNone
licenseMIT
keywords quant quantitative investment trading algotrading
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # VeighNa框架的TuShare数据服务接口

<p align="center">
  <img src ="https://vnpy.oss-cn-shanghai.aliyuncs.com/vnpy-logo.png"/>
</p>

<p align="center">
    <img src ="https://img.shields.io/badge/version-1.4.7.0-blueviolet.svg"/>
    <img src ="https://img.shields.io/badge/platform-windows|linux|macos-yellow.svg"/>
    <img src ="https://img.shields.io/badge/python-3.10|3.11|3.12-blue.svg"/>
    <img src ="https://img.shields.io/github/license/vnpy/vnpy.svg?color=orange"/>
</p>

## 说明

基于tushare模块的1.4.7版本开发,支持以下中国金融市场的K线数据:

* 期货:
  * CFFEX:中国金融期货交易所
  * SHFE:上海期货交易所
  * DCE:大连商品交易所
  * CZCE:郑州商品交易所
  * INE:上海国际能源交易中心
* 股票:
  * SSE:上海证券交易所
  * SZSE:深圳证券交易所
  * BSE:北京证券交易所

注意:需要使用相应的数据服务权限,可以通过[该页面](https://www.tushare.pro)注册使用。

## 数据使用事项

tushare数据源期货数据中,第一条夜盘k线数据是集合竞价数据,用户可以根据自己需求进行过滤或者合并。

## 安装

安装环境推荐基于3.9.0版本以上的【[**VeighNa Studio**](https://www.vnpy.com)】。

直接使用pip命令:

```
pip install vnpy_tushare
```


或者下载源代码后,解压后在cmd中运行:

```
pip install .
```


## 使用

在VeighNa中使用TuShare时,需要在全局配置中填写以下字段信息:

|名称|含义|必填|举例|
|---------|----|---|---|
|datafeed.name|名称|是|tushare|
|datafeed.username|用户名|否|token|
|datafeed.password|密码|是|c3a110417f08f26d2c221edc0c50d4a8a5001502eea89cf5|


# 单元测试

单元测试代码目录为`./tests/test_*.py`
```sh
# 指定文件执行单元测试
python -m unittest tests\test_your_file_name.py

# 全量执行
python -m unittest
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://www.vnpy.com",
    "name": "vnpy-tushare",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "quant, quantitative, investment, trading, algotrading",
    "author": "Xiaoyou Chen",
    "author_email": "xiaoyou.chen@mail.vnpy.com",
    "download_url": "https://files.pythonhosted.org/packages/2d/b2/cbf4c8fe2837d58d977b6442297ceca045dab2aff0115813592e97756c50/vnpy_tushare-1.4.7.0.tar.gz",
    "platform": null,
    "description": "# VeighNa\u6846\u67b6\u7684TuShare\u6570\u636e\u670d\u52a1\u63a5\u53e3\r\n\r\n<p align=\"center\">\r\n  <img src =\"https://vnpy.oss-cn-shanghai.aliyuncs.com/vnpy-logo.png\"/>\r\n</p>\r\n\r\n<p align=\"center\">\r\n    <img src =\"https://img.shields.io/badge/version-1.4.7.0-blueviolet.svg\"/>\r\n    <img src =\"https://img.shields.io/badge/platform-windows|linux|macos-yellow.svg\"/>\r\n    <img src =\"https://img.shields.io/badge/python-3.10|3.11|3.12-blue.svg\"/>\r\n    <img src =\"https://img.shields.io/github/license/vnpy/vnpy.svg?color=orange\"/>\r\n</p>\r\n\r\n## \u8bf4\u660e\r\n\r\n\u57fa\u4e8etushare\u6a21\u5757\u76841.4.7\u7248\u672c\u5f00\u53d1\uff0c\u652f\u6301\u4ee5\u4e0b\u4e2d\u56fd\u91d1\u878d\u5e02\u573a\u7684K\u7ebf\u6570\u636e\uff1a\r\n\r\n* \u671f\u8d27\uff1a\r\n  * CFFEX\uff1a\u4e2d\u56fd\u91d1\u878d\u671f\u8d27\u4ea4\u6613\u6240\r\n  * SHFE\uff1a\u4e0a\u6d77\u671f\u8d27\u4ea4\u6613\u6240\r\n  * DCE\uff1a\u5927\u8fde\u5546\u54c1\u4ea4\u6613\u6240\r\n  * CZCE\uff1a\u90d1\u5dde\u5546\u54c1\u4ea4\u6613\u6240\r\n  * INE\uff1a\u4e0a\u6d77\u56fd\u9645\u80fd\u6e90\u4ea4\u6613\u4e2d\u5fc3\r\n* \u80a1\u7968\uff1a\r\n  * SSE\uff1a\u4e0a\u6d77\u8bc1\u5238\u4ea4\u6613\u6240\r\n  * SZSE\uff1a\u6df1\u5733\u8bc1\u5238\u4ea4\u6613\u6240\r\n  * BSE\uff1a\u5317\u4eac\u8bc1\u5238\u4ea4\u6613\u6240\r\n\r\n\u6ce8\u610f\uff1a\u9700\u8981\u4f7f\u7528\u76f8\u5e94\u7684\u6570\u636e\u670d\u52a1\u6743\u9650\uff0c\u53ef\u4ee5\u901a\u8fc7[\u8be5\u9875\u9762](https://www.tushare.pro)\u6ce8\u518c\u4f7f\u7528\u3002\r\n\r\n## \u6570\u636e\u4f7f\u7528\u4e8b\u9879\r\n\r\ntushare\u6570\u636e\u6e90\u671f\u8d27\u6570\u636e\u4e2d\uff0c\u7b2c\u4e00\u6761\u591c\u76d8k\u7ebf\u6570\u636e\u662f\u96c6\u5408\u7ade\u4ef7\u6570\u636e\uff0c\u7528\u6237\u53ef\u4ee5\u6839\u636e\u81ea\u5df1\u9700\u6c42\u8fdb\u884c\u8fc7\u6ee4\u6216\u8005\u5408\u5e76\u3002\r\n\r\n## \u5b89\u88c5\r\n\r\n\u5b89\u88c5\u73af\u5883\u63a8\u8350\u57fa\u4e8e3.9.0\u7248\u672c\u4ee5\u4e0a\u7684\u3010[**VeighNa Studio**](https://www.vnpy.com)\u3011\u3002\r\n\r\n\u76f4\u63a5\u4f7f\u7528pip\u547d\u4ee4\uff1a\r\n\r\n```\r\npip install vnpy_tushare\r\n```\r\n\r\n\r\n\u6216\u8005\u4e0b\u8f7d\u6e90\u4ee3\u7801\u540e\uff0c\u89e3\u538b\u540e\u5728cmd\u4e2d\u8fd0\u884c\uff1a\r\n\r\n```\r\npip install .\r\n```\r\n\r\n\r\n## \u4f7f\u7528\r\n\r\n\u5728VeighNa\u4e2d\u4f7f\u7528TuShare\u65f6\uff0c\u9700\u8981\u5728\u5168\u5c40\u914d\u7f6e\u4e2d\u586b\u5199\u4ee5\u4e0b\u5b57\u6bb5\u4fe1\u606f\uff1a\r\n\r\n|\u540d\u79f0|\u542b\u4e49|\u5fc5\u586b|\u4e3e\u4f8b|\r\n|---------|----|---|---|\r\n|datafeed.name|\u540d\u79f0|\u662f|tushare|\r\n|datafeed.username|\u7528\u6237\u540d|\u5426|token|\r\n|datafeed.password|\u5bc6\u7801|\u662f|c3a110417f08f26d2c221edc0c50d4a8a5001502eea89cf5|\r\n\r\n\r\n# \u5355\u5143\u6d4b\u8bd5\r\n\r\n\u5355\u5143\u6d4b\u8bd5\u4ee3\u7801\u76ee\u5f55\u4e3a`./tests/test_*.py`\r\n```sh\r\n# \u6307\u5b9a\u6587\u4ef6\u6267\u884c\u5355\u5143\u6d4b\u8bd5\r\npython -m unittest tests\\test_your_file_name.py\r\n\r\n# \u5168\u91cf\u6267\u884c\r\npython -m unittest\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Tushare datafeed for VeighNa quant trading framework.",
    "version": "1.4.7.0",
    "project_urls": {
        "Homepage": "https://www.vnpy.com"
    },
    "split_keywords": [
        "quant",
        " quantitative",
        " investment",
        " trading",
        " algotrading"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4c4128f4f999ed7c8476ca76cf462abf7bf3109817d1dcff53c054fc11aa1930",
                "md5": "9e81dae2a54290ed9f2268ceef6c3fd6",
                "sha256": "3f767dd50469c27cfc64f11fbc57b3436bb16538bee4863f91e48fc962a9f3d0"
            },
            "downloads": -1,
            "filename": "vnpy_tushare-1.4.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9e81dae2a54290ed9f2268ceef6c3fd6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 7731,
            "upload_time": "2024-07-04T05:55:26",
            "upload_time_iso_8601": "2024-07-04T05:55:26.977094Z",
            "url": "https://files.pythonhosted.org/packages/4c/41/28f4f999ed7c8476ca76cf462abf7bf3109817d1dcff53c054fc11aa1930/vnpy_tushare-1.4.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2db2cbf4c8fe2837d58d977b6442297ceca045dab2aff0115813592e97756c50",
                "md5": "9161a8201c622a3a2acfb68c222c551d",
                "sha256": "e2d9fb8a18d7aa014ee63547431e38b6e93398c2325921e3be3d0192747c0b32"
            },
            "downloads": -1,
            "filename": "vnpy_tushare-1.4.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9161a8201c622a3a2acfb68c222c551d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6664,
            "upload_time": "2024-07-04T05:55:28",
            "upload_time_iso_8601": "2024-07-04T05:55:28.409339Z",
            "url": "https://files.pythonhosted.org/packages/2d/b2/cbf4c8fe2837d58d977b6442297ceca045dab2aff0115813592e97756c50/vnpy_tushare-1.4.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-04 05:55:28",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "vnpy-tushare"
}
        
Elapsed time: 0.86111s