Skip to main content

数据共享API服务平台命令行工具

Project description

cyberquant

数据共享 API 服务平台的命令行工具。

安装

# 推荐使用 pipx(隔离环境)
pipx install cyberquant

# 或使用 pip
pip install cyberquant

快速开始

  1. 首次配置

    cyberquant config set
    

    交互式输入 API 端点地址和 API Key。

  2. 查询数据

    cyberquant query stock_daily --code 000001.SZ
    

主要命令

config — 配置管理

cyberquant config set      # 设置端点和 API Key
cyberquant config list     # 查看当前配置
cyberquant config status   # 查询账户状态

query — 数据查询

# JSON 输出
cyberquant query a-daily-bfq --tradeDate 2026-06-01 --stockCode 920992 --pageSize 10

# JSON 输出文件,日期支持范围查询(同一参数多次传递)
cyberquant query a-rt-min --tradeTime 2026-05-20 --tradeTime 2026-05-21 --stockCode sz301125 --period 5 --output ~/Downloads/rt-min-query.json

# CSV 格式输出到文件, --all(自动翻页)
cyberquant query a-rt-min --tradeTime 2026-05-20 --tradeTime 2026-05-21 --stockCode sz301125 --period 5 --all --format csv --output ~/Downloads/rt-min-query.csv

stream — 实时流

# 实时行情(JSON 输出)
cyberquant stream a-rt-min --tradeTime 2026-05-20 --tradeTime 2026-05-21 --stockCode sz301125 --period 5

# 输出到 CSV 文件,日期支持范围查询(同一参数多次传递)
cyberquant stream a-rt-min --tradeTime 2026-05-20 --tradeTime 2026-05-21 --stockCode sz301125 --period 5 --format csv --output ~/Downloads/rt-min-stream.csv

技术要求

  • Python >= 3.10
  • 依赖:Typer、Rich、httpx

许可证

[待添加]

Project details


Download files

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

Source Distribution

cyberquant-1.0.1.tar.gz (12.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cyberquant-1.0.1-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file cyberquant-1.0.1.tar.gz.

File metadata

  • Download URL: cyberquant-1.0.1.tar.gz
  • Upload date:
  • Size: 12.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for cyberquant-1.0.1.tar.gz
Algorithm Hash digest
SHA256 6be1bfb78e528daf3f3150ea643549610a344a8c9a8a0e8e42435bf65b2d038b
MD5 6ffe54e9aa911b22bfe19b4a284ade95
BLAKE2b-256 1d04d8665f413831dea6dfde076ec73dcfbe02809f9ce2152ec32efcd82235b8

See more details on using hashes here.

File details

Details for the file cyberquant-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: cyberquant-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for cyberquant-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 488304c77ea1d6fc121bca38294ec054127f5ad33e282c59898b4d3364e5ec80
MD5 e71eab35e05fdf45b5d766d60138bff5
BLAKE2b-256 da0cffd4b34c9c3801df37487bfc4d6a3d4abda34150b0a21a14af5cf8576a3d

See more details on using hashes here.

Supported by

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