vn.py框架的BaoStock数据服务接口
说明
基于baostock模块的0.8.8版本开发,支持以下中国金融市场的K线数据:
- 股票:
- SSE:上海证券交易所
- SZSE:深圳证券交易所
安装
安装需要基于2.6.0版本以上的VN Studio。
直接使用pip命令:
pip install vnpy_baostock
或者下载解压后运行:
python setup.py install
使用
在vn.py中使用BaoStock时,需要在全局配置中填写以下字段信息:
| 名称 | 含义 | 必填 | 举例 |
|---|---|---|---|
| datafeed.name | 名称 | 是 | baostock |
| datafeed.username | 用户名 | 否 | anonymous |
| datafeed.password | 密码 | 否 | 123456 |
Metadata
Release files for vnpy-baostock 1.0.4
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_baostock-1.0.4.tar.gz | 4.4 kB | With provenance | Details for vnpy_baostock-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vnpy_baostock-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for vnpy_baostock-1.0.4-py3-none-any.whl |
Total release size: 9.2 kB
Release files / vnpy_baostock-1.0.4.tar.gz
| Download URL | vnpy_baostock-1.0.4.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c9577190a3329de0e7ace2cb97902ef2cdb8fe8fbdbad4bb51d63f856c5d5694
|
|
BLAKE2b-256 checksum How to use checksums |
51ebab02f0f6f60e83dfec59f8b47ca64597db2cda746b740ce7ac29ec9cdc5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 29, 2026.
Transparency logRelease files / vnpy_baostock-1.0.4-py3-none-any.whl
| Download URL | vnpy_baostock-1.0.4-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8ce78c43a6eb390b7a8f57cd715d04318207bf60fdca48907a2c106775fb8750
|
|
BLAKE2b-256 checksum How to use checksums |
1ea1bccd35054cb2fdecd81c0e05b7e008205e2ecad115bbe5b2a3de6fdd434e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 29, 2026.
Transparency logSecurity for vnpy-baostock 1.0.4
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for vnpy_baostock-1.0.4.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 29, 2026.
Transparency logA 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.