Kline / Candlestick Data
GET
/api/v1/gateway/public/klinesK Line provides historical candlestick (K line) data for a specified trading pair on our platform.
请求参数
The trading pair symbol for which K line data is requested.
The time interval for the K lines (eg. 1m, 3m, 5m, 15m, 30m, 1h, 4h, 8h, 12h,1d).
The start time for the K line data (Unix timestamps in milliseconds & UTC). If not provided, the API returns the most recent K lines.
The end time for the K line data (Unix timestamps in milliseconds & UTC). If not provided, the API returns the most recent K lines.
Default 500; max 1000.
示例代码
Responses
An array containing K line data for the specified trading pair.
An array containing K line data for the specified trading pair.
The time for the opening of the K line (Unix timestamps in milliseconds & UTC).
The opening price of the K line.
The highest price reached during the K line period.
The lowest price reached during the K line period.
The closing price of the K line.
The total trading volume during the K line period.
The number of trades executed during the K line period.
The time for the closing of the K line (Unix timestamps in milliseconds & UTC).
The volume of quote asset during the K line period.
The volume of base asset bought by takers during the K line period.
The volume of quote asset bought by takers during the K line period.
{
"error": false,
"klines": [
{
"openTime": 1700656800000,
"openPrice": "31546.94000000",
"highPrice": "33967.88000000",
"lowPrice": "31546.94000000",
"closePrice": "33967.88000000",
"volume": "5.31000000",
"trades": 97,
"closeTime": 1700657099999,
"quoteVolume": "174255.65300000",
"takerBuyBaseVolume": "4.35000000",
"takerBuyQuoteVolume": "31886.08500000"
},
{
"openTime": 1700657100000,
"openPrice": "31505.21000000",
"highPrice": "33675.33000000",
"lowPrice": "31505.21000000",
"closePrice": "33675.33000000",
"volume": "5.24000000",
"trades": 97,
"closeTime": 1700657399999,
"quoteVolume": "171609.25410000",
"takerBuyBaseVolume": "4.79000000",
"takerBuyQuoteVolume": "14812.27780000"
}
]
}