通达信数据读取接口
开源协议: MIT license
版本更新
修改获取股票数据接口(自动全部获取).
修改指数数据接口,市场参数错误。
修复财务数据无法下载问题.
更新了详细的文档.
多种线路配置方案. (配置文件, 环境变量等).
重写了专业财务数据接口.
更新了最佳服务器选择问题.
修改了 PIP 安装程序问题.
本程序全面支持 python3.
通达信客户端文件转换.
通达信在线行情下载.
运行环境
操作系统: Windows / MacOS / Linux 都可以运行.
Python: 3.5 以及以上版本, 不支持 python2.
依赖库: pytdx>=1.67
安装方法
# PIP 自动安装方法 pip install mootdx # 手动下载源码安装 git clone --depth=1 https://github.com/bopo/mootdx.git cd mootdx python setup.py install
使用说明
命令行工具
mootdx --help Usage: mootdx [OPTIONS] COMMAND [ARGS]... Options: -v, --verbose --help Show this message and exit. Commands: affair 财务文件下载&解析. bestip 测试行情服务器. quotes 读取股票在线行情数据. reader 读取股票本地行情数据.
使用最快的服务器
# -w 参数是写入配置文件 mootdx bestip -w -v
通达信离线数据读取
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')
加微信交流
欢迎赞助
更新历史
0.3.2 (2019-10-25)
更新接口测试用例.
更新文档内容.
0.2.0 (2018-07-28)
增加财务数据接口.
增加扩展行情接口.
0.1.8 (2018-05-02)
修改部分接口名称.
修改一些功能错误.
0.1.0 (2017-09-22)
第一次发布到 PyPI.
Metadata
Release files for mootdxpro 1.3.18
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 |
|---|---|---|---|---|
| mootdxpro-1.3.18.tar.gz | 22.9 kB | Without provenance | Details for mootdxpro-1.3.18.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mootdxpro-1.3.18-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for mootdxpro-1.3.18-py2.py3-none-any.whl |
Total release size: 47.9 kB
Release files / mootdxpro-1.3.18.tar.gz
| Download URL | mootdxpro-1.3.18.tar.gz |
|---|---|
| Size | 22.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5bbe5699214f345bd893ec552e1491d5b356d522ef75f878f501aad83de10a06
|
|
BLAKE2b-256 checksum How to use checksums |
d8e66215a232cae61f55fb6e19f092f491d983a76859b48960f17f0939ac7562
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.2
|
Release files / mootdxpro-1.3.18-py2.py3-none-any.whl
| Download URL | mootdxpro-1.3.18-py2.py3-none-any.whl |
|---|---|
| Size | 24.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
066c45f6d63aac494262d0b4d48031b5376338cfd2ff1ac29bf010e7c3272bbb
|
|
BLAKE2b-256 checksum How to use checksums |
7d81730f6ed7d5fbb359dee3449e19d5db4a812ff5cf6cfde9f9d55653df2ade
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.11.2
|
Security for mootdxpro 1.3.18
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.