贵金属 {#metals}
贵金属独立路径与 scope:metal_realtime / metal_kline。无复权;K 线周期:60 / 300 / 900 / 1800 / 3600 / 86400。
覆盖分组(meta.groups / 条目 groups):
| 分组 | 说明 |
|---|---|
| 黄金主力合约 | 现货金银、延期、纽约连续、沪金/沪银连续等 |
| 国际黄金 | 现货金银铂钯、港台黄金等 |
| 上海黄金交易所 | 延期、9999/9995、金条、铂金等 |
完整代码以 GET /public/v1/metals 为准(可按 group / keyword 筛选)。常见别名:XAUUSD→XAU,AUT→AUT+D。
GET /public/v1/metals
GET /public/v1/metals?group=国际黄金
GET /public/v1/metals?keyword=延期
GET /v1/metal/realtime?symbols=XAU,AU9999,AU0001
GET /v2/metal/kline?symbol=XAU&period=60&count=120
GET /v2/metal/kline?symbol=XAU&period=300&count=500×tamp=1786106100
GET /v1/metal/physical/brands
GET /v1/metal/physical/products?brand=laofengxiang
GET /v1/metal/physical/prices
GET /v1/metal/physical/prices?date=2026-08-07&brand=laofengxiang
GET /v1/metal/physical/prices?brand=laofengxiang&product=黄金价格
GET /v1/metal/physical/prices?brand=老凤祥&product=黄金&start_date=2026-08-01&end_date=2026-08-07| 接口 | scope | 说明 |
|---|---|---|
/public/v1/metals | 无 | 公开清单;可选 keyword、group、limit |
/v1/metal/realtime | metal_realtime | 实时快照;symbols 或 symbol,可多只 |
/v2/metal/kline | metal_kline | K 线(最多 5;count 上限 1000);响应 fields + symbols;可选 timestamp(秒)向前翻页,下一页用 meta.next_timestamp |
/v1/metal/physical/brands | metal_realtime | 实物黄金品牌;可选 keyword |
/v1/metal/physical/products | metal_realtime | 品牌下产品;可选 brand、keyword |
/v1/metal/physical/prices | metal_realtime | 日更金店报价。无参=最近日全表;date=单日;同时传 brand+product=该产品历史序列(meta.mode=history);也可 start_date+end_date(须带 brand 或 product) |
实物日价字段:date、brand_id、brand、product、prev_price、price、change。历史按 date 升序。
开通状态见 GET /v1/me 与公开 GET /public/v1/catalog。
国内期货 {#futures}
国内期货独立路径与 scope:futures_realtime / futures_kline / futures_stream。无复权;K 线周期:60 / 300 / 900 / 1800 / 3600 / 86400。
支持的交易所
| 交易所 | 码 | 清单 / 实时 / K 线 | SSE / WS 推送 |
|---|---|---|---|
| 上期所 | SHFE | ✅ | ✅ |
| 大商所 | DCE | ✅ | ✅ |
| 郑商所 | CZCE | ✅ | ✅ |
| 能源中心 | INE | ✅ | ✅ |
| 中金所 | CFFEX | ✅ | ✅ |
支持的代码
| 类型 | 示例 | 说明 |
|---|---|---|
| 连续主力 | AU0001、IF0001 | 品种连续合约;清单以 *0001 为主 |
| 近月合约 | AU2610、IF2609、PG2612 | 品种 + YYMM;见清单 contracts |
不支持
| 项目 | 说明 |
|---|---|
广期所 GFEX | 未接入;相关品种如铂 PT、钯 PD 不可查 |
| 其它未列入交易所 / 品种 | 不在公开清单内的代码会拒绝 |
GET /public/v1/futures
GET /public/v1/futures?exchange=SHFE
GET /public/v1/futures?keyword=黄金
GET /v1/futures/realtime?symbols=AU0001,AU2610,IF2609
GET /v2/futures/kline?symbol=AU0001&period=86400&count=120
GET /v2/futures/kline?symbol=AU2610&period=300&count=200×tamp=1786106100
GET /v1/futures/stream?exchanges=SHFE
GET /v1/futures/stream?symbols=AU0001,AU2610| 接口 | scope | 说明 |
|---|---|---|
/public/v1/futures | 无 | 公开清单;可选 exchange、keyword、limit;含交易所、品种、连续主力及近月 contracts(YYMM) |
/v1/futures/realtime | futures_realtime | 实时快照;symbols 或 symbol,可多只 |
/v2/futures/kline | futures_kline | K 线(最多 5;count 上限 1000);响应 fields + symbols;可选 timestamp(秒)向前翻页;连续主力与真月(品种+YYMM)均可查 |
/v1/futures/stream | futures_stream | SSE 推送;可选 symbols / exchanges(SHFE / DCE / CZCE / INE / CFFEX);事件 ready / tick / ping / evicted;真实月合约盘中可订 |
/v1/futures/ws | futures_stream | WebSocket 推送;参数与 SSE 相同;JSON 帧含 type;浏览器请用 query api_key= |
并发路数见 GET /v1/me 的 max_futures_stream_subscriptions(国内期货单独配置,与个股 Tick WS 无关)。同一通道内 SSE 与 WS 同源计数;超出顶掉最早连接。
开通状态见 GET /v1/me 与公开 GET /public/v1/catalog。
国内期货 V2 {#futures-v2}
与「国内期货」并存的独立产品线:路径 /futures-v2,scope futures_v2_realtime / futures_v2_trend / futures_v2_kline / futures_v2_stream。无复权;K 线周期:60 / 300 / 900 / 1800 / 3600 / 7200 / 14400 / 28800 / 86400 / 604800 / 2592000。
支持的交易所
| 交易所 | 码 | 清单 / 实时 / 分时 / K 线 | SSE / WS 推送 |
|---|---|---|---|
| 上期所 | SHFE | ✅ | ✅ |
| 大商所 | DCE | ✅ | ✅ |
| 郑商所 | CZCE | ✅ | ✅ |
| 能源中心 | INE | ✅ | ✅ |
| 广期所 | GFEX | ✅ | ✅ |
| 中金所 | CFFEX | ✅ | ✅ |
支持的代码
| 类型 | 示例 | 说明 |
|---|---|---|
| 连续主力 | AU0001、IF0001 | 品种连续合约 |
| 近月合约 | AU2610、IF2609、PG2612 | 品种 + YYMM;见清单 contracts |
GET /public/v1/futures-v2
GET /public/v1/futures-v2?exchange=SHFE
GET /public/v1/futures-v2?keyword=黄金
GET /v1/futures-v2/realtime?exchange=SHFE
GET /v1/futures-v2/realtime?exchange=CFFEX&kind=continuous
GET /v1/futures-v2/realtime?symbol=AU0001
GET /v1/futures-v2/trend?symbol=AU0001
GET /v1/futures-v2/stream?exchange=SHFE
GET /v1/futures-v2/stream?symbol=AU0001
WS /v1/futures-v2/ws?exchange=SHFE&api_key=...
WS /v1/futures-v2/ws?symbol=AU0001&api_key=...推送为 compact:ready 声明 fields 一次,之后 tick 的 data: 仅为数组行(与 fields 对齐),例如:
event: ready
data: {"type":"ready","format":"compact","fields":["symbol","exchange","price","open","high","low","prev_close","bid","ask","volume","timestamp","received_at"],"exchange":"SHFE","evicted":0}
event: tick
data: ["AU0001","SHFE",952.48,951.0,953.0,950.5,950.0,952.4,952.6,1234,1786700000000,1786700000123]| 接口 | scope | 说明 |
|---|---|---|
/public/v1/futures-v2 | 无 | 公开清单;可选 exchange、keyword、limit |
/v1/futures-v2/realtime | futures_v2_realtime | 实时快照;exchange 整板与 symbol 单码点查二选一;可选 kind=continuous|contract |
/v1/futures-v2/trend | futures_v2_trend | 分时;单标的;当日序列 |
/v1/futures-v2/stream | futures_v2_stream | SSE 推送;exchange 整板(连续+月合约)与 symbol 单码二选一;ready 带 fields,tick 仅为数组行(compact) |
/v1/futures-v2/ws | futures_v2_stream | WebSocket;参数与 SSE 相同;帧为 JSON:ready / {"type":"tick","data":[...]} / ping / evicted;浏览器请用 query api_key= |
/v2/futures-v2/kline | futures_v2_kline | K 线(单标的;count 上限 1000);响应 fields + symbols;可选 timestamp(秒)向前翻页 |
并发路数与 v1 共用字段 max_futures_stream_subscriptions,但 v2 通道单独计数(SSE 与 WS 在本通道内同源)。超出顶掉最早连接。
开通状态见 GET /v1/me 与公开 GET /public/v1/catalog。
全球指数 {#global-indices}
全球指数独立路径与 scope:global_index_realtime / global_index_trend / global_index_kline。标准码后缀 .GI(如 DJI.GI、SPX.GI、KS11.GI);清单含 name 与俗称 aliases。无复权;K 线周期:60 / 300 / 900 / 1800 / 3600 / 86400。
与 A 股指数(/v1/index/*、/public/v1/indices)及国际债券(/v1/global-bond/*)强制拆分,不可混用。
GET /public/v1/global-indices
GET /public/v1/global-indices?group=亚洲
GET /public/v1/global-indices?keyword=道指
GET /v1/global-index/realtime?symbols=DJI.GI,KS11.GI
GET /v1/global-index/trend?symbol=N225.GI
GET /v1/global-index/trend?symbol=N225.GI&date=20260812
GET /v2/global-index/kline?symbol=DJI.GI&period=86400&count=120| 接口 | scope | 说明 |
|---|---|---|
/public/v1/global-indices | 无 | 公开清单;可选 keyword、group、listed、limit |
/v1/global-index/realtime | global_index_realtime | 实时快照;symbols 或 symbol,可多只 |
/v1/global-index/trend | global_index_trend | 分时;单标的;可选 date=YYYYMMDD(默认最新有数据交易日) |
/v2/global-index/kline | global_index_kline | K 线(单标的;count 上限 1000);响应 fields + symbols;可选 timestamp(秒)向前翻页 |
国际债券 {#global-bonds}
国际债券收益率独立路径与 scope:global_bond_realtime / global_bond_kline。标准码后缀 .GB(如 US10Y.GB、JP10Y.GB);清单分组:美国 / 欧洲 / 亚洲 / 其他。无复权;K 线周期同全球指数。
与全球指数、A 股债券(/v1/bonds、可转债等)强制拆分,不可混用。
GET /public/v1/global-bonds
GET /public/v1/global-bonds?group=美国
GET /public/v1/global-bonds?keyword=美债
GET /v1/global-bond/realtime?symbols=US10Y.GB,JP10Y.GB
GET /v2/global-bond/kline?symbol=US10Y.GB&period=86400&count=120| 接口 | scope | 说明 |
|---|---|---|
/public/v1/global-bonds | 无 | 公开清单;可选 keyword、group、listed、limit |
/v1/global-bond/realtime | global_bond_realtime | 实时快照;symbols 或 symbol,可多只 |
/v2/global-bond/kline | global_bond_kline | K 线(最多 5;count 上限 1000);响应 fields + symbols;可选 timestamp(秒)向前翻页 |
站内板块 {#plates}
站内主题库板块:标识为整数 plate_id(清单 GET /v1/catalog/plates)。独立 scope:plate_realtime / plate_trend / plate_kline / plate_moneyflow。
与 新浪板块资金流向榜(/v1/moneyflow/ranking/boards,身份为 name + category)不是同一套,不可互换。
GET /v1/plate/realtime?plate_id=16842834
GET /v1/plate/realtime?plate_id=16842834,16868321
GET /v1/plate/trend?plate_id=16842834
GET /v2/plate/kline?plate_id=16842834&period=86400&count=120
GET /v1/plate/moneyflow?plate_id=16842834
GET /v1/plate/moneyflow/ranking?type=industry&limit=50
GET /public/v1/plate/moneyflow/schema| 接口 | scope | 说明 |
|---|---|---|
/v1/plate/realtime | plate_realtime | 实时快照;plate_id 可批量;含 fund_flow、涨跌家数等 |
/v1/plate/trend | plate_trend | 当日分时(单板);pre_close + data[{timestamp,price,change_percent}];不支持历史 date |
/v2/plate/kline | plate_kline | 仅日 K(period=86400);无复权;最多 5;timestamp(秒)向前翻页;响应 fields + symbols |
/v1/plate/moneyflow | plate_moneyflow | 按 plate_id 查当日资金流快照 |
/v1/plate/moneyflow/ranking | plate_moneyflow | type=all/concept/industry/style,默认按 fund_flow 排序 |
/public/v1/plate/moneyflow/schema | 无 | 字段说明 |
实时 / 资金流主要字段:plate_id、name、change_percent、rise_count、fall_count、limit_up_count、fund_flow(元);可选 stay_count、rank。