API REFERENCE

指数盘中分钟

实时行情

股票、ETF、交易所指数、申万指数与期货分开请求。返回统一采用 data.fields + data.items,并在 data.meta 中给出数据时间与缓存状态。

交易所指数盘中分钟线

POSThttps://jinniu.ziyoutang.com/api/rt_idx_min_daily

查询单个交易所指数当日开盘以来的全部分钟 K 线,返回时间从早到晚排列,并沿用“指数实时”权限。

请求参数

参数必填说明
ts_code是单个交易所指数代码,例如 399300.SZ。
freq是1min、5min、15min、30min 或 60min。
fields否可选返回字段,与指数实时分钟线一致。

请求示例

curl -X POST 'https://jinniu.ziyoutang.com/api/rt_idx_min_daily' \
  -H 'Content-Type: application/json' \
  -H 'X-Api-Key: YOUR_API_KEY' \
  -d '{"ts_code":"399300.SZ","freq":"5min"}'

返回参数

字段类型说明
data.fields / data.itemsarray / array字段列表和当日分钟 K 线,按时间正序返回。
data.meta.matched_count / returned_countnumber匹配行数和实际返回行数,单位:条。
data.meta.cached / staleboolean是否命中短时缓存、是否使用短时容错数据。

返回示例

{"success":true,"message":"","data":{"fields":["ts_code","freq","trade_time","open","close","high","low","vol","amount"],"items":[["399300.SZ","5min","2026-09-22 09:35:00",4621.2,4628.4,4630.1,4618.6,128335000,2839740000]],"meta":{"matched_count":48,"returned_count":48,"truncated":false,"cached":false,"stale":false,"cache_ttl_seconds":2,"cache_age_seconds":0,"server_received_at":"2026-09-22 15:00:02"}}}

实时返回元数据

字段说明
cached是否命中服务器缓存;实时分钟线可能为 true,实时日线固定为 false。
stale是否在行情服务临时失败时返回短时缓存;实时日线不使用缓存,固定为 false。
cache_ttl_seconds缓存有效期,单位:秒;实时分钟线为 2 秒,实时日线为 0 秒。
cache_age_seconds当前缓存已存在的时长,单位:秒;实时日线固定为 0。
server_received_at服务器接收到行情数据的北京时间;时间字段,无计量单位。
max_age_seconds返回 K 线中最旧数据距服务器当前时间的最大时长,单位:秒;无法计算时为 null。