Get Kline
API Description
Retrieves kline (candlestick) data for a specific trading pair. This endpoint provides historical price data including open, high, low, close prices and volume for specified time intervals.
HTTP Request
GET /v5/market/klineRequest Parameters
Parameter
Type
Required
Description
symbol
string
Yes
Symbol name (e.g., BTCUSDT)
interval
string
Yes
Kline interval: 1, 3, 5, 15, 30, 60, 120, 240, 360, 720, D, W, M
start
string
No
Start time (ms)
end
string
No
End time (ms)
limit
number
No
Number of data points (max 1000)
Response Parameters
Parameter
Type
Description
symbol
string
Trading pair symbol
openTime
number
Opening time timestamp
open
number
Opening price
high
number
Highest price in the period
low
number
Lowest price in the period
close
number
Closing price
closeTime
number
Closing time timestamp
baseVolume
number
Base asset volume
quoteVolume
number
Quote asset volume
Request Example
cURL
curl -X GET \
'https://api.synfutures.com/v5/market/kline?category=linear&symbol=BTCUSDT&interval=1&limit=100' \
-H 'Content-Type: application/json'JavaScript (Fetch)
const response = await fetch(
"https://api.synfutures.com/v5/market/kline?category=linear&symbol=BTCUSDT&interval=1&limit=100",
{
method: "GET",
headers: {
"Content-Type": "application/json",
},
}
);
const data = await response.json();
console.log(data);Python (requests)
import requests
url = "https://api.synfutures.com/v5/market/kline"
params = {
'category': 'linear',
'symbol': 'BTCUSDT',
'interval': '1',
'limit': 100
}
headers = {
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers, params=params)
result = response.json()
print(result)Response Example
Success Response
{
"code": 0,
"data": [
{
"symbol": "string",
"openTime": 0,
"open": 0,
"high": 0,
"low": 0,
"close": 0,
"closeTime": 0,
"baseVolume": 0,
"quoteVolume": 0
}
],
"msg": "string",
"requestId": "string"
}Error Response
{
"code": 400,
"msg": "Request parameter error",
"data": {},
"requestId": "string"
}Last updated