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(token="你的访问令牌")

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

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

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

也可通过 JCDATA_BASE_URL 覆盖默认服务地址(默认为 https://api.jicequant.com)。

使用

import jcdata

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

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

主要接口

  • 行情get_market_data
  • 基础信息get_instrumentget_price_limitsget_adj_factorget_turn_rateget_trading_status
  • 期货/转债get_settlementget_conv_bond_termsget_future_contract
  • 股票因子get_valuationget_market_valueget_finance
  • 其它get_trade_datesget_index_constituentsget_option_barsget_option_infoget_sectors(板块成分快照)

代码格式为 Wind 风格,如 600000.SH

使用限制

  • 请求频率:短时请求过密时,库会自动等待后重试,单次调用可能略慢。
  • 每周数据量:按返回的非空单元格累计,每周一 0:00(北京时间)重置;用尽时抛出 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.2.tar.gz (10.9 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.2-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jcdata-0.1.2.tar.gz
  • Upload date:
  • Size: 10.9 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.2.tar.gz
Algorithm Hash digest
SHA256 473fda1bfce84690c83e9f1096a2f83c8a1d93af6a0fb8a33dc2eb5c38ace5d9
MD5 3cb18d91d3b93b7199d94961800b5a06
BLAKE2b-256 0874aa59a8a4ff61ad03ba995a31dbc1b2bb8872f50eab2d728fc07756d85b09

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jcdata-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.1 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f5c663c07b1336cfdeea60900c20b2b6b1b5af3253864f6505f81f5e25b45509
MD5 8bcb9f9094153851b50625f6569b61ec
BLAKE2b-256 c7d838fe9d2aedb2bf4175b68e5855d75e3e0eb7fb531db234af5c71627c045f

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