Skip to main content

股票个人量化交易数据获取模块

Project description

数据获取

直接通过pip安装即可:

pip install -U qfetch

数据获取模块qfetch是相对独立的模块,主要功能是从公开的数据源获取数据。qfetch提供两种api,一种是异步版本,以fetch_开头,另外一种是阻塞版本,以block_fetch_ 开头。

Rust编写的模块和函数是通过qfetch.qfetch导出,该模块原样导出Rust 封装的函数(.pyi\ 文件)。一般情况下,是不需要使用该包下面的函数,在qfetch.fetch下面有此包的包装函数,包装函数除了可返回原始的Rust输出外,也提供可选装换为pd.Dataframe格式的参数。如:

In [1]: import qfetch as fetch

In [2]: await fetch.fetch_trade_date()
Out[2]: 
      trade_date
0       20120104
1       20120105
2       20120106
3       20120109
4       20120110
...          ...
8306    20021225
8307    20021226
8308    20021227
8309    20021230
8310    20021231

[8311 rows x 1 columns]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

qfetch-0.1.2-cp312-cp312-macosx_11_0_arm64.whl (13.2 MB view hashes)

Uploaded CPython 3.12 macOS 11.0+ ARM64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page