Skip to main content

Intraday Candle Data Deprecatedโ€‹

API to retrieve OHLC (Open, High, Low, Close) values for instruments during the current trading day. Data is accessible for 1-minute and 30-minute intervals from the beginning of the market session. For real-time candlestick updates, it is advisable to utilize the Market Update Stream.

Requestโ€‹

curl --location 'https://api.upstox.com/v2/historical-candle/intraday/NSE_EQ%7CINE848E01016/1minute' \
--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.

Path Parametersโ€‹

NameRequiredTypeDescription
instrument_keytruestringThe unique identifier for the financial instrument for which historical data is being queried. For the regex pattern applicable to this field, see the Field Pattern Appendix.
intervaltruestringSpecifies the time frame of the candles.
Possible values: 1minute, 30minute.
Responses

Response Bodyโ€‹

{
"status": "success",
"data": {
"candles": [
[
"2023-10-19T15:15:00+05:30",
2305.3,
2307.05,
2301,
2304.65,
559982,
0
],
[
"2023-10-19T14:45:00+05:30",
2309.1,
2310.75,
2305.25,
2305.3,
740124,
0
]
]
}
}
NameTypeDescription
statusstringA string indicating the outcome of the request. Typically success for successful operations.
dataobjectContains OHLC values for all instruments across various timeframes.
data.candlesarray[]Array of candle data, each presented as an array with sequential elements representing trading activity.
data.candle[0]numberTimestamp: Indicating the start time of the candle's timeframe.
data.candle[1]numberOpen: The opening price of the asset for the given timeframe.
data.candle[2]numberHigh: The highest price at which the asset traded during the timeframe.
data.candle[3]numberLow: The lowest price at which the asset traded during the timeframe.
data.candle[4]numberClose: The closing price of the asset for the given timeframe.
data.candle[5]numberVolume: The total amount of the asset that was traded during the timeframe.
data.candle[6]numberOpen Interest: The total number of outstanding derivative contracts, such as options or futures.

Sample Codeโ€‹

Get intraday candle data with a 1-minute intervalโ€‹

curl --location 'https://api.upstox.com/v2/historical-candle/intraday/NSE_EQ%7CINE848E01016/1minute' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'

Get intraday candle data with a 30-minute intervalโ€‹

curl --location 'https://api.upstox.com/v2/historical-candle/intraday/NSE_EQ%7CINE848E01016/30minute' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {your_access_token}'
Loading...