Skip to main content

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:

ParameterTypeRequiredDescription
symbolstringtrueContract symbol
intervalstringfalseInterval: Min1, Min5, Min15, Min30, Min60, Hour4, Hour8, Day1, Week1, Month1. Default is Min1 if omitted
startlongfalseUnix second timestamp
endlongfalseUnix second timestamp

Response Parameters:

ParameterTypeDescription
opendoubleOpen
closedoubleClose
highdoubleHigh
lowdoubleLow
voldoubleVolume
timelongTime window

Notes:

  1. 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.

  2. 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.