Query Historical K-Lines
Endpoint Information
Endpoint: GET /market/v1/tickers/{symbol}/klines
Description: Query historical K-line data, supports filtering by market and time range
Authentication: Institution API Key + Signature (non-Maker API endpoint — X-Maker-Addr is not required). See Authorization
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| market | ENUM | Yes | Market code. See Market enum type description |
| start_time | LONG | Yes | Start time, UNIX timestamp (seconds) |
| end_time | LONG | Yes | End time, UNIX timestamp (seconds) |
| interval | ENUM | Yes | K-line interval. See KLineInterval enum type description |
| limit | INT | No | Number of K-lines per page, default: 100, maximum: 1000 |
Response Parameters
| Field | Type | Description |
|---|---|---|
| time | STRING | K-line time |
| open | DECIMAL | Opening price |
| high | DECIMAL | Highest price |
| low | DECIMAL | Lowest price |
| close | DECIMAL | Closing price |
| volume | DECIMAL | Trading volume |
| turnover | DECIMAL | Trading amount |
| change | DECIMAL | Price change amount |
| percentage_change | DECIMAL | Price change percentage % |
| turnover_rate | DECIMAL | Turnover rate % |
Request Example
bash
curl -X GET "{API_BASE_URL}/market/v1/tickers/AAPLs/klines?market=usex&interval=day&start_time=1745996160&end_time=1748588160" \
-H "X-API-Key: YOUR_API_KEY" \
-H "X-API-Timestamp: 1746774142000" \
-H "X-API-Signature: GENERATED_SIGNATURE"Response Example
json
{
"code": 0,
"data": [
{
"time": "2025-04-30 11:30:00",
"open": 209.09,
"high": 210.60,
"low": 208.45,
"close": 210.28,
"volume": 2905057,
"turnover": 609394203.45,
"change": 1.19500000,
"percentage_change": 0.57,
"turnover_rate": 0.019
},
{
"time": "2025-04-30 12:30:00",
"open": 210.30,
"high": 211.02,
"low": 209.69,
"close": 210.33,
"volume": 2135477,
"turnover": 449913588.39,
"change": 0.04500000,
"percentage_change": 0.02,
"turnover_rate": 0.014
}
]
}Error Example
json
{
"code": 500,
"message": "Internal Service Error",
"details": ""
}