kiteconnect.exceptions.InputException: interval exceeds max limit: 35 days

arva
I randomly keep on getting this error. It is very random, hence not consistently able to reproduce this. Exactly same issue as described in https://kite.trade/forum/discussion/13045/getting-random-non-reproducible-35-day-limit-error#latest

And it is not yet solved, although I got this error after few days tonight.
  • rakeshr
    We are checking this.
  • arva
    Again got this today.
  • sujith
    Can you share the complete debug logs for this? Our team is not able to reproduce this error. We need the complete request and response details to resolve the issue.
  • arva
    return func(*args, **kwargs)
    File "/home/a/.local/lib/python3.8/site-packages/kiteconnect/connect.py", line 621, in historical_data
    data = self._get("market.historical",
    File "/home/a/.local/lib/python3.8/site-packages/kiteconnect/connect.py", line 836, in _get
    return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json)
    File "/home/a/.local/lib/python3.8/site-packages/kiteconnect/connect.py", line 912, in _request
    raise exp(data["message"], code=r.status_code)
    kiteconnect.exceptions.InputException: interval exceeds max limit: 35 days
  • arva
    I got it today multiple times.
  • sujith
    You need to enable debug logs while initializing. You can take a look at source code here.
  • sujith
    We need complete request and response logs to investigate further.
  • arva
    DEBUG:kiteconnect.connect:Request: GET https://api.kite.trade/instruments/historical/64225799/minute {'from': '2023-08-22 00:00:00', 'to': '2023-10-19 20:42:13', 'interval': 'minute', 'continuous': 0, 'oi': 1} {'X-Kite-Version': '3', 'User-Agent': 'Kiteconnect-python/3.9.4', 'Authorization': 'token YYYYY:XXXXXXX'}
    DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kite.trade:443
    DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "GET /instruments/historical/64225799/minute?from=2023-08-22+00%3A00%3A00&to=2023-10-19+20%3A42%3A13&interval=minute&continuous=0&oi=1 HTTP/1.1" 400 108
    DEBUG:kiteconnect.connect:Response: 400 b'{"status":"error","message":"interval exceeds max limit: 35 days","data":null,"error_type":"InputException"}'
    Fatal exception interval exceeds max limit: 35 days
  • arva
    Now the error is coming more frequently.
  • rakeshr
    Is this happening still? Can you re-check once? @arva
  • arva
    @rakeshr yesterday it happened only couple of times post-midnight. But throughout the day today and yesterday I didn't see the error.
Sign In or Register to comment.