Query current and historical gold reference prices across exchanges, banks, London markets, and jewelry stores.
Coding
Futures Inquiry - 期货查询
Query live and historical futures data across five major Chinese exchanges.
What it does
Retrieve futures quotes from SHFE, DCE, CZCE, CFFEX, and GFEX, optionally filtering by contract code. The included Python script uses a JisuAPI AppKey and returns latest price, change, intraday high/low, volume, open interest, bid/ask data, and update time. Historical queries return OHLC, change, volume, and open interest for a specified contract and date range.
When to use it
- Checking a main contract’s latest price
- Comparing today’s high, low, and percentage change
- Reviewing a contract over a date range
- Looking up volume, open interest, or bid/ask quotes
The skill document
极速数据期货查询(Jisu Futures)
数据由 极速数据(JisuAPI) 提供 — 提供上海、大连、郑州、中金、广州等交易所期货价格查询。
何时使用本技能
- 期货价格、主力合约、某品种涨跌(如螺纹钢、豆粕、PTA、工业硅、IF 股指)
- 五大交易所行情:上期所、大商所、郑商所、中金所、广期所
- 历史走势:指定合约在某段时间的开高低收、成交量、持仓量
技术前提: 脚本 skills/futures/futures.py,环境变量 JISU_API_KEY。
接口与数据范围:
- 上海期货交易所(
/futures/shfutures) - 大连商品交易所(
/futures/dlfutures) - 郑州商品交易所(
/futures/zzfutures) - 中国金融期货交易所(
/futures/zgjrfutures) - 广州期货交易所(
/futures/gzfutures) - 期货历史查询(
/futures/history)
各交易所实时接口返回:品种代号、名称、最新价、涨跌幅、涨跌量、最高/最低价、开盘价、昨收盘价、成交量、持仓量、买卖价量、更新时间等。
前置配置:获取 API Key
# Linux / macOS
export JISU_API_KEY="your_appkey_here"
# Windows PowerShell
$env:JISU_API_KEY="your_appkey_here"
脚本路径
脚本文件:skills/futures/futures.py
使用方式
1. 上海期货交易所(/futures/shfutures)
python3 skills/futures/futures.py shfutures
# 指定品种(可选 type)
python3 skills/futures/futures.py shfutures '{"type":"FU2309"}'
2. 大连商品交易所(/futures/dlfutures)
python3 skills/futures/futures.py dlfutures
python3 skills/futures/futures.py dlfutures '{"type":"V0"}'
3. 郑州商品交易所(/futures/zzfutures)
python3 skills/futures/futures.py zzfutures
python3 skills/futures/futures.py zzfutures '{"type":"TA0"}'
4. 中国金融期货交易所(/futures/zgjrfutures)
python3 skills/futures/futures.py zgjrfutures
python3 skills/futures/futures.py zgjrfutures '{"type":"IF2306"}'
5. 广州期货交易所(/futures/gzfutures)
python3 skills/futures/futures.py gzfutures
python3 skills/futures/futures.py gzfutures '{"type":"SI0"}'
6. 期货历史查询(/futures/history)
按交易所、合约代码与日期区间查询历史开高低收、涨跌幅、成交量、持仓量等。
python3 skills/futures/futures.py history '{"market":"shfutures","type":"SC2703","startdate":"2026-06-01","enddate":"2026-06-10"}'
请求 JSON:
{
"market": "shfutures",
"type": "SC2703",
"startdate": "2026-06-01",
"enddate": "2026-06-10"
}
| 字段名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| market | string | 是 | shfutures / dlfutures / zzfutures / zgjrfutures / gzfutures |
| type | string | 是 | 期货类型代码,如 SC2703、TA0、IF2306 |
| startdate | string | 是 | 开始日期 |
| enddate | string | 是 | 结束日期 |
各交易所实时接口可选参数
| 字段名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| type | string | 否 | 期货类型代码 |
实时接口 result 按品种名称分组,例如 {"燃油": [...], "铜": [...]}。
返回结果示例(节选)
上海期货交易所(实时)
{
"燃油": [
{
"type": "FU2309",
"typename": "燃料油2309",
"price": "2948.00",
"changepercent": "+6.27%",
"changequantity": "+174",
"maxprice": "2975.00",
"minprice": "2777.00",
"openingprice": "2782.00",
"lastclosingprice": "2774.000",
"tradeamount": "704525",
"holdamount": "295063",
"buyamount": "47",
"buyprice": "2947.000",
"sellamount": "66",
"sellprice": "2948.000",
"updatetime": "2023-04-03 15:46:43"
}
]
}
期货历史查询
{
"market": "shfutures",
"type": "SC2703",
"startdate": "2026-06-01",
"enddate": "2026-06-10",
"count": 8,
"list": [
{
"typename": "上海原油2703",
"date": "2026-06-10",
"openingprice": 562,
"maxprice": 565.6,
"minprice": 550.8,
"price": 559.2,
"changeamount": -5.8,
"changepercent": "-1.027%",
"tradeamount": 23,
"holdamount": 0
}
]
}
当无数据时,脚本会输出:
{
"error": "api_error",
"code": 201,
"message": "没有信息"
}
常见错误码
来源于 极速数据期货文档:
| 代号 | 说明 |
|---|---|
| 201 | 没有信息 |
系统错误码:
| 代号 | 说明 |
|---|---|
| 101 | APPKEY 为空或不存在 |
| 102 | APPKEY 已过期 |
| 103 | APPKEY 无请求此数据权限 |
| 104 | 请求超过次数限制 |
| 105 | IP 被禁止 |
| 106 | IP 请求超过限制 |
| 107 | 接口维护中 |
| 108 | 接口已停用 |
推荐用法
-
实时行情:用户问「PTA、燃油今天什么价?」
- 调用
zzfutures、shfutures等对应交易所 - 从返回的分组结果中按品种名(如
PTA、燃油)筛选合约,汇总price、changepercent、maxprice、minprice
- 调用
-
单合约查询:已知合约代码时加
type参数,减少返回体积:
python3 skills/futures/futures.py zzfutures '{"type":"TA0"}' -
历史走势:用户问「SC2703 最近一周走势」
- 调用
history,market与交易所子命令一致(如上期所 →shfutures) - 用
list中的开高低收、涨跌幅归纳区间表现,并注明数据时效与免责
- 调用
-
交易所对照
用户说法 子命令 history 的 market 上期所、上海 shfuturesshfutures大商所、大连 dlfuturesdlfutures郑商所、郑州 zzfutureszzfutures中金所、股指 zgjrfutureszgjrfutures广期所、广州 gzfuturesgzfutures
关于极速数据
极速数据(JisuAPI,jisuapi.com) 是国内专业的 API数据服务平台 之一,提供生活常用、交通出行、工具万能、图像识别、娱乐购物、位置服务等百余类 API。
在官网注册后,按 期货查询 API 申请数据,在会员中心获取 AppKey 进行接入。在 ClawHub 上也可搜索 jisuapi 找到更多基于极速数据的 OpenClaw 技能。
Questions people ask
- Which futures exchanges are supported?
- It supports the Shanghai Futures Exchange, Dalian Commodity Exchange, Zhengzhou Commodity Exchange, China Financial Futures Exchange, and Guangzhou Futures Exchange.
- What does a historical query require and return?
- Provide the market, contract code, start date, and end date. Results include daily open, high, low, close, change, percentage change, volume, and open interest when data is available.
- What setup is required?
- Run `skills/futures/futures.py` with Python and set the `JISU_API_KEY` environment variable to an AppKey obtained after applying for the JisuAPI futures data service.
Related skills
Query stocks, funds, indices, news, valuations, K-lines, and financial statements through routed market-data APIs.
Retrieve structured Chinese market data and research material through a searchable CLI.
Convert Chinese finance questions into checked Tushare research workflows, summaries, and data files.
Turn A-share data and filings into a structured fundamental, valuation, governance, and risk assessment.
Builds a personalized career plan with fit assessments, AI-risk ratings, and staged next steps.