☰
Login
Signup
Home
›
General
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.9K
All Categories
0
Incidents
156
Node JS client
40
Go client
793
.Net API client
380
Kite Publisher
537
.Net / VBA / Excel (3rd party)
458
Algorithms and Strategies
999
Java client
1.1K
API clients
404
PHP client
4K
Python client
348
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
March 2023
vatsa
March 2023
sujith
How much time it takes to get the historical data.
vatsa
March 2023
in
General
Hi
I subscribed to historical data for my app. The expiry shows 1 month from now. But when i try to get the historical data it gives below error.
Or am i am missing somethings?
---------------------------------------------------------------------------
PermissionException Traceback (most recent call last)
~\AppData\Local\Temp\ipykernel_17304\3114211674.py in
----> 1 kite.historical_data(instrument_token = 2953217,from_date = formatted_date_last_month, to_date=formatted_date, interval="day")
~\Anaconda3\envs\kite\lib\site-packages\kiteconnect\connect.py in historical_data(self, instrument_token, from_date, to_date, interval, continuous, oi)
629 to_date_string = to_date.strftime(date_string_format) if type(to_date) == datetime.datetime else to_date
630
--> 631 data = self._get("market.historical",
632 url_args={"instrument_token": instrument_token, "interval": interval},
633 params={
~\Anaconda3\envs\kite\lib\site-packages\kiteconnect\connect.py in _get(self, route, url_args, params, is_json)
849 def _get(self, route, url_args=None, params=None, is_json=False):
850 """Alias for sending a GET request."""
--> 851 return self._request(route, "GET", url_args=url_args, params=params, is_json=is_json)
852
853 def _post(self, route, url_args=None, params=None, is_json=False, query_params=None):
~\Anaconda3\envs\kite\lib\site-packages\kiteconnect\connect.py in _request(self, route, method, url_args, params, is_json, query_params)
925 # native Kite errors
926 exp = getattr(ex, data.get("error_type"), ex.GeneralException)
--> 927 raise exp(data["message"], code=r.status_code)
928
929 return data["data"]
PermissionException: Insufficient permission for that call.
PermissionException: Insufficient permission for that call.
sujith
March 2023
You need to generate a new access token after subscribing to historical data.
vatsa
March 2023
It works. Thanks
This discussion has been closed.