Gate 永续成交价与标记价K线:参数、响应与查询工具
按结算币、永续合约和周期读取K线,并通过合约前缀区分成交价、标记价与指数价序列。
GET /futures/{settle}/candlesticks这条查询解决什么问题
mark_ 和 index_ 前缀会改变价格口径,成交张数 v 仅在没有这些前缀时返回,不能把缺失量字段补成真实零成交。
这是公开数据的读取接口说明。行情、合约与市场状态会变化,字段定义与返回数据应分开核对。
查看官方英文说明
Futures market K-line chart
Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit when specifying `from`, `to` and `interval`
请求参数逐项核对
字段名和数据类型保留官方拼写。必填标记来自规格;描述中的条件约束还需要一起检查。
| 参数与位置 | 类型与范围 | 官方字段说明 |
|---|---|---|
settlepath · 必填 | string枚举:btc / usdt / usd1 | Perpetual futures settlement currency |
contractquery · 必填 | string | Futures contract |
fromquery · 可选 | integer格式:"int64" | Start time of candlesticks, formatted in Unix timestamp in seconds. Default to`to - 100 * interval` if not specified |
toquery · 可选 | integer格式:"int64" | Specify the end time of the K-line chart, defaults to current time if not specified, note that the time format is Unix timestamp with second precision |
limitquery · 可选 | integer默认:100;最大:2000 | Maximum number of recent data points to return. `limit` conflicts with `from` and `to`. If either `from` or `to` is specified, request will be rejected. |
intervalquery · 可选 | string默认:"5m";枚举:10s / 1m / 5m / 15m / 30m / 1h / 4h / 8h / 1d / 7d | Time interval for data points. Note: 1w represents a natural week, 7d is aligned with Unix epoch time, 30d represents a natural month |
timezonequery · 可选 | string默认:"utc0" | Time zone: all/utc0/utc8, default utc0 |
在本页组装查询 URL
填写参数后生成一个 GET 地址,只在浏览器本地处理。留空的可选项不会发送。请勿填写密码、API Key 或 Secret。
尚未生成 URL。
不会向 Gate 或本站发送表单内容。
工具检查必填、枚举与简单数值范围,不代替服务端校验。复合参数、时间窗口、条件必填等请对照上方原文。
响应字段怎样阅读
以下展示的是规格中的类型定义,不是现场 API 响应,也不是行情样本。嵌套结构展开至三层;数组的 [] 表示其中一个元素。
HTTP 200 · Query successful
| 字段路径 | 数据类型 | 字段说明 |
|---|---|---|
$ | array<object> | 未提供字段注释 |
$[] | object | data point in every timestamp |
$[].t | number格式:"double" | Unix timestamp in seconds |
$[].v | string | size volume (contract size). Only returned if `contract` is not prefixed |
$[].c | string | Close price (quote currency) |
$[].h | string | Highest price (quote currency) |
$[].l | string | Lowest price (quote currency) |
$[].o | string | Open price (quote currency) |
$[].sum | string | Trading volume (unit: Quote currency) |
来源、版本与使用说明
本站独立整理 Gate 技术资料,不代表 Gate,不提供账户、交易、充值或软件下载服务。
参数和字段改编自 Gate 官方 SDK 的 Apache 2.0 开放规格,固定版本为 v4.106.132。核对时官网文档已为 v4.106.136,后续变更须以官网为准;本页并未声称对该接口做过在线实测。
中文用途解释、字段阅读界面和本地 URL 组装器由本站整理。访问日志用于站点运维;页面没有第三方统计脚本,表单参数仅在当前页面内存中处理。