期货行情(期货合约 K 线)

SkillDev tools

Queries futures market data (daily/weekly/monthly/quarterly/yearly K-lines for futures contracts, futures_contract_kline). Use when the user asks about futures contract K-lines, daily/weekly/monthly futures K-lines, contract open/high/low/close, futures volume and open interest, vwap, or adjustment

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the 期货行情(期货合约 K 线) skill

What this skill tells your AI

The instructions your AI receives, as published by ftshare-lab/ftshare-skill in ftshare-market-data/sub-skills/futures-contract-kline/SKILL.md and read by ahel’s review.

1. 接口描述

项目说明
接口名称期货行情(futures_contract_kline)
外部接口GET /api/v1/market/data/futures/kline
请求方式GET(query 参数)
适用场景查询期货合约日、周、月、季、年 K 线,含开高低收、成交量、成交额、vwap、持仓量、主力合约与前/后复权因子

2. 请求参数

参数名类型是否必填描述取值示例备注
symbolstring期货合约代码A2605.DCE支持交易所短后缀
intervalstringK 线周期dailydaily/1dweekly/1w/weekmonthly/1mo/monthquarterly/1q/quarteryearly/1y/year;默认 daily
startint起始时间戳(毫秒)1756431000000闭区间;可省略时间范围
endint结束时间戳(毫秒)1756791000000闭区间;不能单独传入
limitint返回条数5默认 500,最小值 1,传 0 时按 1 处理

3. 响应说明

外层固定为 code / message / datadata 为对象:items(K 线记录列表)和 total(符合条件记录总数)。

items 元素:

字段名类型说明
symbolstring规范化后的合约代码
datetimeint64K 线时间戳(毫秒)
trade_dateint交易日 YYYYMMDD
open / high / low / closenumber开盘价 / 最高价 / 最低价 / 收盘价
volumeint64成交量
amountnumber成交额
vwapnumber成交均价
open_interestnumber持仓量
dominant_contractstring / null主力合约;合约 K 线不返回该字段值
forward_factornumber / null前复权因子;合约 K 线不返回该字段值
backward_factornumber / null后复权因子;合约 K 线不返回该字段值

4. 调用方式

python <RUN_PY> futures-contract-kline --symbol A2605.DCE --interval daily --limit 5
python <RUN_PY> futures-contract-kline --symbol A2605.DCE --interval weekly --limit 5
python <RUN_PY> futures-contract-kline --symbol A2605.DCE --start 1756431000000 --end 1756791000000

<RUN_PY> 为主 SKILL.md 同级 run.py 的绝对路径。输出 JSON;HTTP 错误输出到 stderr 并以非零状态退出。

5. 注意事项

  • 周、月、季、年 K 线基于日 K 线按北京时间聚合。
  • end 不能单独传入,必须与 start 同时使用(handler 会本地校验并拒绝);仅传 start 时查询 start 之后的数据。
  • 同时传入 startend 时,跨度不得超过 12 个日历月。
  • 本接口查询的是具体合约 K 线;dominant_contract 和复权因子字段对合约 K 线不返回值。

Signals

GitHub stars
64
Forks
13
Last commit
Sep 2026

ahel review

  • K6low
    bundled executables the agent is told to run

Automated review, not a security audit. Ruleset v1+k2.

Advanced
Catalog kind
skill
Gateway key
futures-contract-kline
Source
github.com/ftshare-lab/ftshare-skill