Skip to main content

Get K-line data

Type: get
Description: /v4/public/kline

Parameters

nametypemandatorydefaultdescriptionranges
symbolstringtruetrading pair eg:btc_usdt
intervalstringtrueK line type,
eg:1m
[1m;3m;5m;15m;30m;1h;2h;4h;6h;8h;12h;1d;3d;1w;1M]
startTimenumberfalsestart timestamp
endTimenumberfalseend timestamp
limitnumberfalse'100'1~1000

Limit Flow Rules

10/s/ip

Request Example

Request
  curl --location --request GET 'https://sapi.xt.com/v4/public/kline?symbol=XT_USDT&interval=3m&startTime=xxxxxxxxx&endTime=xxxxxxxxx&limit=100' \
--header 'accept: */*' \
--header 'Content-Type: application/json' \

Response

Response
{
"rc": 0,
"mc": "string",
"ma": [{}],
"result": [
{
"t": 1662601014832, //open time
"o": "30000", //open price
"c": "32000", //close price
"h": "35000", //highest price
"l": "25000", //lowest price
"q": "512", //transaction quantity
"v": "15360000" //transaction volume
}
]
}