Get Index Price Candles
Request Example
curl "https://api.mexc.com/api/v1/contract/kline/index_price/BTC_USDT?interval=Min15&start=1609992674&end=1610113500"
Response Example
{
"success": true,
"code": 0,
"data": {
"time": [
1761876000,
1761876900,
1761877800,
1761878700,
1761879600
],
"open": [
109620.6,
109057.0,
109358.4,
108788.3,
108857.6
],
"close": [
109057.0,
109358.4,
108788.3,
108857.6,
108628.4
],
"high": [
109685.6,
109474.8,
109408.0,
108963.7,
108872.3
],
"low": [
109013.6,
109057.0,
108745.9,
108564.5,
108622.8
],
"vol": [
0.0,
0.0,
0.0,
0.0,
0.0
],
"amount": [
0.0,
0.0,
0.0,
0.0,
0.0
],
"realOpen": [
109057.0,
109358.4,
108788.3,
108857.6,
108628.4
],
"realClose": [
109057.0,
109358.4,
108788.3,
108857.6,
108628.4
],
"realHigh": [
109057.0,
109358.4,
108788.3,
108857.6,
108628.4
],
"realLow": [
109057.0,
109358.4,
108788.3,
108857.6,
108628.4
]
}
}
- GET
/api/v1/contract/kline/index_price/{symbol}
Request Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | true | Contract symbol |
| interval | string | false | Interval: Min1, Min5, Min15, Min30, Min60, Hour4, Hour8, Day1, Week1, Month1. Default is Min1 if omitted |
| start | long | false | Unix second timestamp |
| end | long | false | Unix second timestamp |
Response Parameters:
| Parameter | Type | Description |
|---|---|---|
| open | double | Open |
| close | double | Close |
| high | double | High |
| low | double | Low |
| vol | double | Volume |
| time | long | Time window |
Notes:
-
The maximum number of data points per request is 2000. If your chosen start/end time and granularity exceed this limit, only 2000 data points will be returned. To obtain fine-grained data over a larger time span, make multiple requests with segmented time ranges.
-
If only the start time is provided, data from the start time to the current system time is returned. If only the end time is provided, the 2000 data points closest to the end time are returned. If neither is provided, the 2000 most recent data points relative to the current system time are returned.