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.py 的 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_instrument、get_price_limits、get_adj_factor、get_turn_rate、get_trading_status - 期货/转债:
get_settlement、get_conv_bond_terms、get_future_contract - 股票因子:
get_valuation、get_market_value、get_finance - 其它:
get_trade_dates、get_index_constituents、get_option_bars、get_option_info、get_sectors(板块成分快照)
代码格式为 代码.交易所,如 600000.SH。
使用限制
- 请求频率:短时请求过密时,库会自动等待后重试,单次调用可能略慢。
- 每周数据量:按返回的非空单元格累计,每周一 0:00(北京时间)重置;用尽时抛出
CellQuotaExceededError。
Project details
Release history Release notifications | RSS feed
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)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
jcdata-0.1.4-py3-none-any.whl
(13.1 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af080bd6758fd77058de07ef14dd376c887ef3a14a2067faf040a62e3990cbe4
|
|
| MD5 |
0b75d1483c77ecb84f890610c0461a9e
|
|
| BLAKE2b-256 |
eeae5c3a52cc7dae9581f85b61ae02db88bbf4a9c04564ba80a4c7327dc9c164
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
81af9dc78a73793442fd693ab38c97dcf7063b32b74a6a59e549b4f22dd6e952
|
|
| MD5 |
598c43c4d0c3181de00865ff693442e8
|
|
| BLAKE2b-256 |
cbe84fbb35f046e62c272fb7177e75a480b45e272b62dc8d6375e11e6593fc34
|