Gateway timed out' error for historical data

keshav_
Unable to load data. {'status': 'error', 'message': 'Gateway timed out', 'error_type': 'NetworkException'}
  • rakeshr
    @keshav_
    Is it happening often? We checked logs at our end, can't find much issue instances.
  • keshav_
    keshav_ edited December 2018
    yeah its happening often

    now i am also getting

    requests.exceptions.SSLError: HTTPSConnectionPool(host='api.kite.trade', port=443): Max retries exceeded with url: /instruments/historical/1332225/minute?from=2018-12-01&to=2018-12-12 (Caused by SSLError(SSLError("bad handshake: SysCallError(54, 'ECONNRESET')")))
  • Ramu772
    I am getting errors from historical api from past week. i am getting all kinds of errors each time. Please let us know if there are any changes made to historical API in last one month

    1. requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)
    2. NetworkException: Request failed (kitetrade-common).
    3. requests.exceptions.ConnectionError: ('Connection aborted.', BadStatusLine("''",))
    4. kiteconnect.exceptions.NetworkException: Request failed (kitetrade-common).
  • sujith
    How often do you make the request?
  • Ramu772
    i am back testing my code and i am requesting all candles one after other(d,60,15,5,3,1) ,usually i do not get this error for the first set of request but i get when i do this second time or later. Some time i get this error even for the first request also.
  • keshav_
    absolutely unable to use Historical API please help getting this error over and over again.
    requests.exceptions.SSLError: HTTPSConnectionPool(host='api.kite.trade', port=443): Max retries exceeded with url: /instruments/historical/340481/minute?from=2018-12-08&to=2018-12-12 (Caused by SSLError(SSLError("bad handshake: SysCallError(54, 'ECONNRESET')")))
  • rajtk
    Read timed out errors. Also FYI, I am sending only sending 1 request at a time every 3 seconds.
    INFY Historical 5MIN data fetching failed HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read ti
    meout=7)
    AUROPHARMA Historical 5MIN data fetching failed HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (r
    ead timeout=7)
    HINDZINC Historical 5MIN data fetching failed HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (rea
    d timeout=7)
    BHARATFORG Historical 5MIN data fetching failed HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (r
    ead timeout=7)
  • rajtk
    This is happening since yesterday evening.
  • allang
    I am also getting the same errors.
    1. requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.kite.trade', port=443): Read timed out. (read timeout=7)
    2. NetworkException: Request failed (kitetrade-common).

    I am making one request per second. Please fix these issues. I am not able to run my strategies because of these issues.
  • rakeshr
    rakeshr edited December 2018
    @allang
    We are already looking into both the above errors. For time being, we will request you to handle above exception at your end.
    from kiteconnect import exceptions

    try:
    Your Historical data fetching code logic
    except ReadTimeout:
    pass
    except exceptions.NetworkException:
    pass
  • johar
    me too. Since two days
    HTTPSConnectionPool(host='api.kite.trade', port=443): Max retries exceeded with url: /instruments/historical/340481/minute?from=2018-12-13&to=2018-12-13&api_key=xxxxxxxxxx (Caused by SSLError(SSLError("bad handshake: SysCallError(10054, 'WSAECONNRESET')",),))
  • Ramu772
    can i know how much do you need to fix this. please at least give us an estimate. We can not wait eternal. we are paying for services. in case the issue is resolved please let us know or make an announcement in a new thread.
  • Ramu772
    i see that data retrievals are smooth now. may the issue is fixed. Thanks.
  • ranjan_barat
    Guys I am facing the same Issue since yesterday, is it happening for other guys as well ?
  • sujith
    It is possible that a request might fail by the time data is fetched. You can add a small delay and fetch it again. You just need to make sure that you don't hit the rate limits.
Sign In or Register to comment.