Facing issues when getting historic data using get_historical_candle_data1 method

Hi All, The following request is resulting in (400) Reason: Bad Request
“error_code”:“UDAPI1088”

Could someone help me troubleshoot this request, dates are in correct format
Using the same client, historic_api and method, I am able to get data for June

Code and Params:

resp = historic_api.get_historical_candle_data1(
                    instrument_key='NSE_EQ|INE038A01020',
                    unit='minutes',
                    interval='1',
                    from_date='2025-04-28',
                    to_date='2025-05-29'
                )

Hi @Sathish_49417565, Kindly review the maximum record retrieval limits provided below. Try fetching the historical candle data within these limits, and let us know if that resolves your issue.

Hi @Anand_Sajankar, The date range between the input dates is 31 calendar days. Does it breach the threshold of “Max retrieval record limit” of 1 month, because when the documentation says 1 month it could mean either 30/31 calendar days.

EDIT: There is some ambiguity in terms of 1 month, which could refer to 30 or 31 days, Anyways I have strictly calculated from_date to be 30 days behind the to_date. Its working fine now.

Thank you @Anand_Sajankar

@Sathish_49417565 Glad to hear it’s working for you!

Although the result may vary between 28, 29, 30, or 31 days depending on the month. Since April has 30 days, the 28th is a valid date (the range simply shifts to the same day of the following month). However, if that specific day doesn’t exist in the next month, it will automatically adjust to the last valid day of that month.

Thanks

1 Like

Sir does these historic data limit applicable for expired option contracts as well?