Can't get historical data before 1st Jan 2024 using the API i.e empty candle data

import upstox_client
from upstox_client.rest import ApiException

api_version = ‘2.0’

api_instance = upstox_client.HistoryApi()
instrument_key = ‘NSE_EQ|INE002A01018’ #Reliance Industries
interval = ‘30minute’
to_date = ‘2024-01-01’
from_date = ‘2023-11-12’
try:
api_response = api_instance.get_historical_candle_data1(instrument_key, interval, to_date,from_date, api_version)
print(api_response)
except ApiException as e:
print(“Exception when calling HistoryApi->get_historical_candle_data: %s\n” % e)

Output I get for the above code is :
{‘data’: {‘candles’: }, ‘status’: ‘success’}

Historical candle data for 30 minutes is available for the past six months only.

Hi @Ketan , I want to know how we can get 1 minute interval data for the past 5 years ?

Hi @Kaustubh_A
You can access 1-minute interval data for the past 6 months. However, for time intervals of 1 day or longer, data is available for the past 5 years.

For more details, please refer to the Historical API.

Thank you.

1 Like