跳到主要内容

查询K线数据

描述

此接口用户返回指定交易对的K线数据

HTTP请求

GET /v3/market/candles

请求参数

参数是否必填类型描述
symbolString交易对。常用形式为“基础货币”+“报价货币”
intervalString枚举:
  • MINUTE_1
  • MINUTE_5
  • MINUTE_15
  • MINUTE_30
  • HOUR_1
  • HOUR_2
  • HOUR_4
  • HOUR_12
  • DAY_1
  • DAY_3
  • WEEK_1
limitInteger返回的最大记录数。默认值为 100,最大值为 500。
sTimeLong开始时间
eTimeLong结束时间

响应参数

参数类型描述
lString最低价
hString最高价
oString开盘价
cString收盘价
amtString成交单位为计价货币的数量
qtyString成交单位为基础货币的数量。如果是合约表示张数
tCString交易次数
sTString开始时间
cTString结束时间

请求示例

{
"symbol": "BTC_USDT_PERP",
"interval": "MINUTE_1",
"limit": "10"
}

响应示例

{
"code": 200,
"data": [
[
"58651",
"58651",
"58651",
"58651",
"0",
"0",
"0",
"0",
"0",
"1719975420000",
"1719975479999"
],
[
"58651",
"58651",
"58651",
"58651",
"0",
"0",
"0",
"0",
"0",
"1719975480000",
"1719975539999"
],
[
"58651",
"58651",
"58651",
"58651",
"0",
"0",
"0",
"0",
"0",
"1719975540000",
"1719975599999"
],
[
"58651",
"58651",
"58651",
"58651",
"0",
"0",
"0",
"0",
"0",
"1719975600000",
"1719975659999"
],
[
"58651",
"58651",
"58651",
"58651",
"0",
"0",
"0",
"0",
"0",
"1719975660000",
"1719975719999"
],
[
"58651",
"58651",
"58651",
"58651",
"0",
"0",
"0",
"0",
"0",
"1719975720000",
"1719975779999"
],
[
"58651",
"58651",
"58651",
"58651",
"0",
"0",
"0",
"0",
"0",
"1719975780000",
"1719975839999"
],
[
"58651",
"58651",
"58651",
"58651",
"0",
"0",
"0",
"0",
"0",
"1719975840000",
"1719975899999"
],
[
"58651",
"58651",
"58651",
"58651",
"0",
"0",
"0",
"0",
"0",
"1719975900000",
"1719975959999"
],
[
"58651",
"58651",
"58651",
"58651",
"0",
"0",
"0",
"0",
"0",
"1719975960000",
"1719976019999"
]
],
"msg": "Success"
}