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

服务地址在安装包 config.pyBASE_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(板块成分快照)

代码格式为 代码.交易所,如 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.4.tar.gz (11.7 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.4-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: jcdata-0.1.4.tar.gz
  • Upload date:
  • Size: 11.7 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.4.tar.gz
Algorithm Hash digest
SHA256 af080bd6758fd77058de07ef14dd376c887ef3a14a2067faf040a62e3990cbe4
MD5 0b75d1483c77ecb84f890610c0461a9e
BLAKE2b-256 eeae5c3a52cc7dae9581f85b61ae02db88bbf4a9c04564ba80a4c7327dc9c164

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jcdata-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 13.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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 81af9dc78a73793442fd693ab38c97dcf7063b32b74a6a59e549b4f22dd6e952
MD5 598c43c4d0c3181de00865ff693442e8
BLAKE2b-256 cbe84fbb35f046e62c272fb7177e75a480b45e272b62dc8d6375e11e6593fc34

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