Historical Data - Getting 504 Gateway Time-out

amitmac2
I am trying to get historical data for few stocks for 2015 and 2016 using Python but after every 3-4 requests it gives me 504 Gateway Time-out error. I am following the 3 requests per second limit but still I am getting this error. Is there anything else to take care of?
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "GET /instruments/historical/138095876/minute?from=2016-03-11+00%3A00%3A00&to=2016-04-15+00%3A00%3A00&interval=minute&continuous=0&oi=0 HTTP/1.1" 200 64796
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "GET /instruments/historical/138095876/minute?from=2016-04-15+00%3A00%3A00&to=2016-05-20+00%3A00%3A00&interval=minute&continuous=0&oi=0 HTTP/1.1" 200 46
DEBUG:urllib3.connectionpool:https://api.kite.trade:443 "GET /instruments/historical/138095876/minute?from=2016-05-20+00%3A00%3A00&to=2016-06-24+00%3A00%3A00&interval=minute&continuous=0&oi=0 HTTP/1.1" 504 None
DataException: Unknown Content-Type (text/html) with response: 504 Gateway Time-out
  • amitmac2
    GET /instruments/historical/138095876/minute?from=2016-04-15+00%3A00%3A00&to=2016-05-20+00%3A00%3A00&interval=minute&continuous=0&oi=0 HTTP/1.1

    This is giving empty data.
  • sujith
    sujith edited October 2023
    We will inform the team to take a look at this, it could be because request is timing out before data is pulled from database. I would suggest, pull the data and dump it at your end and use that as source.
  • rakeshr
    Intraday data is available from 2019-01-01 from instrument token 138095876.
Sign In or Register to comment.