通达信数据读取接口
如果喜欢本项目可以在右上角给颗⭐!你的支持是我最大的动力😎!
郑重声明: 本项目只作学习交流, 不得用于任何商业目的.
- 开源协议: MIT license
- 在线文档: https://www.mootdx.com
- 国内镜像: https://gitee.com/ibopo/mootdx
- 项目仓库: https://github.com/mootdx/mootdx
- 问题交流: https://github.com/mootdx/mootdx/issues
版本更新(倒序)
版本更新日志: https://mootdx.readthedocs.io/zh_CN/latest/history/
运行环境
- 操作系统: Windows / MacOS / Linux 都可以运行.
- Python: 3.8 以及以上版本.
安装方法
新手建议使用
pip install -U 'mootdx[all]'安装
PIP 安装方法
# 包含核心依赖安装
pip install 'mootdx'
# 包含命令行依赖安装, 如果使用命令行工具可以使用这种方式安装
pip install 'mootdx[cli]'
# 包含所有扩展依赖安装, 如果不清楚各种依赖关系就用这个命令
pip install 'mootdx[all]'
升级安装
pip install -U tdxpy mootdx
如果不清楚各种依赖关系就用这个命令
pip install -U 'mootdx[all]'
使用说明
以下只列举一些例子, 详细说明请查看在线文档: https://www.mootdx.com
通达信离线数据读取
from mootdx.reader import Reader
# market 参数 std 为标准市场(就是股票), ext 为扩展市场(期货,黄金等)
# tdxdir 是通达信的数据目录, 根据自己的情况修改
reader = Reader.factory(market='std', tdxdir='C:/new_tdx')
# 读取日线数据
reader.daily(symbol='600036')
# 读取分钟数据
reader.minute(symbol='600036')
# 读取时间线数据
reader.fzline(symbol='600036')
通达信线上行情读取
from mootdx.quotes import Quotes
# 标准市场
client = Quotes.factory(market='std', multithread=True, heartbeat=True)
# k 线数据
client.bars(symbol='600036', frequency=9, offset=10)
# 指数
client.index(symbol='000001', frequency=9)
# 分钟
client.minute(symbol='000001')
通达信财务数据读取
from mootdx.affair import Affair
# 远程文件列表
files = Affair.files()
# 下载单个
Affair.fetch(downdir='tmp', filename='gpcw19960630.zip')
# 下载全部
Affair.parse(downdir='tmp')
加微信交流
常见问题
M1 mac 系统PyMiniRacer不能使用,访问: https://github.com/sqreen/PyMiniRacer/issues/143
Stargazers over time
Metadata
Release files for mootdx 0.11.7
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 |
|---|---|---|---|---|
| mootdx-0.11.7.tar.gz | 99.2 kB | Without provenance | Details for mootdx-0.11.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mootdx-0.11.7-py3-none-any.whl | Python 3 | none | any | Details for mootdx-0.11.7-py3-none-any.whl |
Total release size: 208.0 kB
Release files / mootdx-0.11.7.tar.gz
| Download URL | mootdx-0.11.7.tar.gz |
|---|---|
| Size | 99.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
446c15f55c1509bc706a1b44d3f26a0f40d7ac016e326ffd6df3cf7ebcdf1c0a
|
|
BLAKE2b-256 checksum How to use checksums |
2a19ede725a3ca8a4a393116ebcf3417f3e708093ff4c55ba87d47fe26ca4b2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.8.18 Linux/5.10.0-19-amd64
|
Release files / mootdx-0.11.7-py3-none-any.whl
| Download URL | mootdx-0.11.7-py3-none-any.whl |
|---|---|
| Size | 108.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
eab475f1d08b1c71ea51212c8b1b1038c4739798f7d95ad1a6fb7bb26e348ef2
|
|
BLAKE2b-256 checksum How to use checksums |
bd7cdff7de8e9d29d49a22ffcb03f765cf829be5097019a760319d908009da54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.2 CPython/3.8.18 Linux/5.10.0-19-amd64
|
Security for mootdx 0.11.7
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.