Skip to main content

Python client for JCDATA market data and factor APIs

Project description

jcdata

连接 JCDATA 数据服务,详情可查看官网:https://jicequant.com/

用户注册后即可在个人中心使用一定额度的数据服务。

安装

pip install jcdata

配置

访问令牌任选一种方式提供:

import jcdata

jcdata.login("你的访问令牌")

或设置环境变量后直接 jcdata.login()

# Linux / macOS
export JCDATA_TOKEN="你的访问令牌"

# Windows PowerShell
$env:JCDATA_TOKEN="你的访问令牌"

服务地址默认为 https://api.jicequant.com(可在安装包内 config.pyBASE_URL 修改)。

使用

import jcdata

jcdata.login("你的访问令牌")
print(jcdata.whoami())

bars = jcdata.get_market_data("600000.SH", "2025-01-01", "2025-01-31")
df = bars["600000.SH"]

主要接口

  • 行情get_market_data
  • 基础信息get_instrumentget_adj_factor
  • 期货/转债get_settlementget_future_contract(转债条款已并入 get_instrument
  • 股票因子get_valuationget_market_valueget_finance
  • 其它get_trade_datesget_all_sectorsget_stock_list_by_sectorget_option_barsget_option_info

代码格式为 代码.交易所,如 600000.SH

使用限制

  • 请求频率:短时请求过密时,库会自动等待后重试。
  • 每周数据量:有用量上限;用尽时抛出 CellQuotaExceededError
  • 大批量代码:一次传入大量代码时,客户端会自动分批请求并合并结果。

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

jcdata-0.1.5.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

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

jcdata-0.1.5-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file jcdata-0.1.5.tar.gz.

File metadata

  • Download URL: jcdata-0.1.5.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for jcdata-0.1.5.tar.gz
Algorithm Hash digest
SHA256 68d8b80b0c6e9b72ae9e4d6385148c30bb95b0002125b60b962ddc4a8dc0cc6a
MD5 8f45d8986e6e36f82c31152efd0d47fe
BLAKE2b-256 88045bdcd0bdde2d5dd64ec940c2255447e722e954adb823edea781596d655b5

See more details on using hashes here.

File details

Details for the file jcdata-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: jcdata-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for jcdata-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4e1e41f1140505eb8278968971a14a23dc3e03cb0c3cec10f1ee33762474768e
MD5 67fd2dba81776643ad10c09f01a7c159
BLAKE2b-256 68bc2dbeaee12c9c4fa56e50beefb40803a873f7757f593212c2eacd6e8d8cb5

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