Skip to main content
GET 

/market-quote/ohlc

OHLC Quotes V3

This API retrieves Open, High, Low, Close (OHLC) quotes for one or more instruments. V3 introduces the following enhancements:

  • live_ohlc: Provides the current OHLC candle.
  • prev_ohlc: Delivers the previous minute's OHLC candle.
  • volume: Includes trading volume data.
  • ts: Returns the OHLC candle's start time.

This API allows 50 requests per second, 500 per minute and 2,000 per 30 minutes. Send up to 500 instrument keys in one request, and each call counts as one request. See Rate Limits.

New Instruments​

  • Global Index — Major global stock market indices such as GIFT NIFTY, Dow Jones, S&P, FTSE 100, and more. See Global Instruments for details and download the Global Instruments file for instrument keys.
  • India VIX — The NSE Volatility Index, available using instrument key NSE_INDEX|India VIX.

Request​

curl --location 'https://api.upstox.com/v3/market-quote/ohlc?instrument_key=NSE_EQ%7CINE669E01016&interval=1d' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'

For additional samples in various languages, please refer to the Sample code section on this page.

Query Parameters​

NameRequiredTypeDescription
instrument_keyRequiredstringComma separated list of instrument keys. For the regex pattern applicable to this field, see the Field Pattern Appendix.
intervalRequiredstringInterval to get ohlc data.
Possible values: 1d, I1, I30.
Here 1d is 1 day, I1 and I30 are 1-minute and 30-minute intervals respectively.

Responses​

Response Body​

{
"status": "success",
"data": {
"NSE_FO:NIFTY2543021600PE": {
"last_price": 303.9,
"instrument_token": "NSE_FO|51834",
"prev_ohlc": {
"open": 303.9,
"high": 304.3,
"low": 303.85,
"close": 304.3,
"volume": 300,
"ts": 1744019880000
},
"live_ohlc": {
"open": 304.45,
"high": 304.45,
"low": 302.75,
"close": 303.9,
"volume": 2250,
"ts": 1744019940000
}
}
}
}
NameTypeDescription
statusstringA string indicating the outcome of the request. Typically success for successful operations.
dataobjectData object holding OHLC information
data.last_pricenumberThe last traded price of symbol
data.instrument_tokenstringKey of the instrument. For the regex pattern applicable to this field, see the Field Pattern Appendix.
data.prev_ohlc.opennumberPrevious trading session open price
data.prev_ohlc.highnumberPrevious trading session high price
data.prev_ohlc.lownumberPrevious trading session low price
data.prev_ohlc.closenumberPrevious trading session close price
data.prev_ohlc.volumenumberTotal volume traded in previous trading session
data.prev_ohlc.tsnumberStart time of previous trading session
data.live_ohlc.opennumberCurrent trading session open price
data.live_ohlc.highnumberCurrent trading session high price
data.live_ohlc.lownumberCurrent trading session low price
data.live_ohlc.closenumberCurrent trading session close price
data.live_ohlc.volumenumberTotal volume traded in current trading session
data.live_ohlc.tsnumberStart time of current trading session

Sample Code​

Get ohlc (open, high, low, close) market quotes​

curl --location 'https://api.upstox.com/v3/market-quote/ohlc?instrument_key=NSE_EQ%7CINE669E01016&interval=1d' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'

Get ohlc (open, high, low, close) market quotes for multiple instrument keys​

curl --location 'https://api.upstox.com/v3/market-quote/ohlc?instrument_key=NSE_EQ%7CINE669E01016%2CNSE_EQ%7CINE848E01016&interval=1d' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'