Getting Lots of 504 Timeout Error while getting historical data

abhaygarg12493
Hello, I am using Kite Connect API (https://kite.trade/docs/connect/v3/historical/) for getting historical data. And the performance of the API is really poor. Approximately out of 5, 3 API get error of 504 Timeout. Please do needful I paid 4000 per month for using Kite Connect API, and this type of behaviour is not expected. This is the response I get from API 504 Gateway Time-out 504 Gateway Time-out nginx I have added the screenshot as well for the same. Please do needful. Thanks Abhay Garg
  • sujith
    Hi Abhay,
    Are you using this for live strategy? How often do you fetch this data?
  • abhaygarg12493
    Hi, I am fetching historical data for learning purpose. But does it matter ? If I paid to get data then why should it matter that for what purpose I use.
    I am fetching it within the API rate limit i.e 3req/sec that is why I don't get API rate limit exception.
  • sujith
    The historical data API is provided for backtesting purpose only. You need to generate candles at your end for live market strategies.
    The ideal way to use it is to dump all the data required at your end and use that as a source.
  • abhaygarg12493
    Yes, I am doing the same. As I said that I am using it for learning purpose So I dump the data but I got 504 timeout exception from Zerodha Server approximately 3 out of 5 times
  • rakeshr
    I got 504 timeout exception from Zerodha Server approximately 3 out of 5 times
    Do let us know the symbol detail/instrument token?
    Are you trying to fetch much older BSE historical data?
  • abhaygarg12493
    I am trying to fetch data of last 15 yrs but it fails randomly
    Here are one of the failed call details
    instrument token 134691076
    tradingsymbol SHETR
    exchange BSE
    interval 60minute
    from 2015-12-28T00:00:00+05:30
    to 2016-12-27T00:00:00+05:30

    Let me know if you need any more details.
  • abhaygarg12493
    It even fails for getting data of 10 days

    instrument token 134714116
    tradingsymbol FILATEX
    exchange BSE
    interval 60minute
    from 2018-09-23T00:00:00+05:30
    to 2018-10-03T00:00:00+05:30
Sign In or Register to comment.