Getting random non-reproducible 35 day limit error

KamalChhirang
I am trying to fetch 1 minute historical data using curl API.

I am getting this error:

{'status': 'error', 'message': 'interval exceeds max limit: 35 days', 'data': None, 'error_type': 'InputException'}

The duration is of around 59 days. But the weird thing is, I am getting this error on random date periods and If I catch the error and try again using exact URL, It is working.

For example this url:

https://api.kite.trade/instruments/historical/676609/minute?from=2022-01-11+09:15:00&to=2022-03-11+15:29:00

I got error when fetching data of this URL, and the error message is mentioned above. But when my code re-tried, the exact same url worked. Now this URL works, but i am getting this error randomly on different 59 days duration periods.

Is there any maintenance work going on Sunday, hence the error?
Tagged:
  • rakeshr
    Can you let us know the request timings?
    For a 1-minute candle, the required limitation is of 60days. Go through this thread.
  • KamalChhirang
    On sunday, I faced this error when I created this post (I can't see the time).

    Today also faced this error at around 8:20 AM (04 Sept)

    Yeah the limit is 60 days, but I am randomly getting this error in some requests, and they work when my code re-tries.

    Just tried now and got this error:

    {'status': 'error', 'message': 'interval exceeds max limit: 35 days', 'data': None, 'error_type': 'InputException'}

    https://api.kite.trade/instruments/historical/676609/minute?from=2023-01-08+09:15:00&to=2023-03-08+15:29:00

    Exact timing of this error: 2023-09-04 10:13:17.929504
  • KamalChhirang
    KamalChhirang edited September 2023
    @rakeshr Are you able to reproduce this error?

    It happens randomly and quite often, so if you try fetching 1 minute data of 60 day period, you should get this error.

    There is no 35 day limit of any type. But I am getting this 35 day limit error message. This should give away something that helps you figure out, why I am getting this error?
  • rakeshr
    /instruments/historical/676609/minute?from=2022-01-11+09%3A15%3A00&to=2022-03-11+15%3A29%3A00&interval=minute&continuous=0&oi=1
    /instruments/historical/676609/minute?from=2023-01-08+09%3A15%3A00&to=2023-03-08+15%3A29%3A00&interval=minute&continuous=0&oi=1
    Tried both of the above mentioned periods, and it's working fine at my end.
    Is it still happening?
  • KamalChhirang
    I changed my maximum batch size to 34 days to avoid this error since last few days.

    Checked today, I am not getting this error anymore with same code. Looks like this issue is fixed now. @rakeshr
This discussion has been closed.