Skip to main content

OHLC Quotes Deprecatedโ€‹

API to retrieve the OHLC (Open, High, Low, Close) quotes for one or more instruments. Provides OHLC snapshots of up to 500 instruments in one go.
This API supports a maximum of 500 instrument keys in a single request. For a time interval of 1d, the API returns only the live_ohlc. Previous day OHLC data is available in Historical Candle Data.

Requestโ€‹

curl --location 'https://api.upstox.com/v2/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}'

Additional samples in various languages are available in the Sample Code section on this page.

Query Parametersโ€‹

NameRequiredTypeDescription
instrument_keytruestringComma separated list of instrument keys. For the regex pattern applicable to this field, see the Field Pattern Appendix.
intervaltruestringInterval 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โ€‹

NameTypeDescription
statusstringA string indicating the outcome of the request. Typically success for successful operations.
dataobjectData object holding OHLC information
data.ohlcobjectData object with OHLC information
data.ohlc.opennumberThe open price of the trading session
data.ohlc.highnumberThe high price of the trading session
data.ohlc.lownumberThe low price of the trading session
data.ohlc.closenumberThe most recent closing price of the symbol
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.

Sample Codeโ€‹

Get ohlc (open, high, low, close) market quotesโ€‹

curl --location 'https://api.upstox.com/v2/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/v2/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}'
Loading...