Python Client is failing to get CONTINUOUS historical data for instrument

naagdev
naagdev edited May 22 in Python client
I am trying to get historical data for 100 days using the api call - kite.historical_data but I get this error:
kiteconnect.exceptions.DataException: Unknown Content-Type (text/html) with response: (<html><body><h1>504 Gateway Time-out</h1>
The server didn't respond in time.
</body></html>
)
using the command:
to_date = datetime(2020,5,21,16,0)
from_date = to_date-timedelta(days=100)
kite.historical_data(13430274, from_date=from_date, to_date=to_date, interval='15minute', continuous=True, oi=False)
This works when my from_date and to_date are 80 days apart or less. But doesn't work for 100 days.

Can you please check?
  • rakeshr
    There are certain limitations for fetching historical data for the required interval as stated below(all in days):
    minute : 60 days
    3minute : 100 days
    5minute : 100 days
    10minute : 100 days
    15minute : 200 days
    30minute : 200 days
    60minute : 400 days
    day : 2000 days
Sign In or Register to comment.