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 --tradeDate 2026-06-01 --stockCode 920992 --pageSize 10
    

主要命令

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.2.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.2-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cyberquant-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 37afe70015350339814da8c9fcc333c060e584fb4dfb19a9f23a7eaeaf494a31
MD5 bf6f8c25b2132b510765415adaaa6485
BLAKE2b-256 f12568866d506d233980fc18dbefea0ceeb96908022e36378b8f313b2c213151

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cyberquant-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c77939311050f1feee9ed03a4ff6d0b6d0627ce540fff0d8e6ea0fabe775b5bb
MD5 ef88a4d724730f00ba54f383b291e546
BLAKE2b-256 bf1e404f7cd7caf84da061781c38638cce42b7b3c017942379b249b35bb3da99

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