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.py 的 BASE_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_instrument、get_adj_factor - 期货/转债:
get_settlement、get_future_contract(转债条款已并入get_instrument) - 股票因子:
get_valuation、get_market_value、get_finance - 其它:
get_trade_dates、get_all_sectors、get_stock_list_by_sector、get_option_bars、get_option_info
代码格式为 代码.交易所,如 600000.SH。
使用限制
- 请求频率:短时请求过密时,库会自动等待后重试。
- 每周数据量:有用量上限;用尽时抛出
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.5.tar.gz
(14.3 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.5-py3-none-any.whl
(15.6 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68d8b80b0c6e9b72ae9e4d6385148c30bb95b0002125b60b962ddc4a8dc0cc6a
|
|
| MD5 |
8f45d8986e6e36f82c31152efd0d47fe
|
|
| BLAKE2b-256 |
88045bdcd0bdde2d5dd64ec940c2255447e722e954adb823edea781596d655b5
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e1e41f1140505eb8278968971a14a23dc3e03cb0c3cec10f1ee33762474768e
|
|
| MD5 |
67fd2dba81776643ad10c09f01a7c159
|
|
| BLAKE2b-256 |
68bc2dbeaee12c9c4fa56e50beefb40803a873f7757f593212c2eacd6e8d8cb5
|