Historical()

gkannan1965
I am having problem with the interval. What are the possible values? I tried:
print kite.historical(1793,'2016-05-11','2016-05-11','1min')
I got this error:
Traceback (most recent call last):
File "historical.py", line 23, in
print kite.historical(1793,'2016-05-11','2016-05-11','1min')
File "D:\Kan\API_Test\kiteconnect\__init__.py", line 390, in historical
"interval": interval})
File "D:\Kan\API_Test\kiteconnect\__init__.py", line 428, in _get
return self._request(route, "GET", params)
File "D:\Kan\API_Test\kiteconnect\__init__.py", line 522, in _request
raise ex.DataException("Unknown Content-Type in response")
kiteconnect.exceptions.DataException: Unknown Content-Type in response
  • Kailash
    The possible values are documented here -- https://kite.trade/docs/connect/v1/#historical-data
  • gkannan1965
    Even if I use the possible values as per the doc, it shows the same error:

    Traceback (most recent call last):
    File "historical.py", line 24, in
    print kite.historical(1793, "2016-05-09" , "2016-05-09", "day")
    File "D:\Kan\API_Test\kiteconnect\__init__.py", line 397, in historical
    "interval": interval})
    File "D:\Kan\API_Test\kiteconnect\__init__.py", line 435, in _get
    return self._request(route, "GET", params)
    File "D:\Kan\API_Test\kiteconnect\__init__.py", line 529, in _request
    raise ex.DataException("Unknown Content-Type in response")
    kiteconnect.exceptions.DataException: Unknown Content-Type in response
  • Kailash
    @gkannan1965 We're looking into this. Just to confirm, you are using the latest version of the Python client library? We'd made some updates last week.
  • gkannan1965
    Yes, Kailash
  • Kailash
    Hi @gkannan1965
    Looks like you haven't subscribed to the historical data APIs. Historical data doesn't come bundled with the Kite Connect APIs. You can subscribe to it by going to your app's page on the developer console.
  • gkannan1965
    Oh OK. Thanks Kailash. I will subscribe and then try.
Sign In or Register to comment.