Skip to main content

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

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)

Source distribution for vnpy-baostock 1.0.4
File Size Uploaded
vnpy_baostock-1.0.4.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vnpy-baostock 1.0.4
File Interpreter ABI Platform
vnpy_baostock-1.0.4-py3-none-any.whl Python 3 none any Details

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 log

Release 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 log

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.2

2 release files

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page