@apind81 Please check if you are using valid access_token. Please check documentation
TokenException
Preceded by a 403 header, this indicates the expiry or invalidation of an authenticated session. This can be caused by the user logging out, a natural expiry, or the user logging into another Kite instance. When you encounter this error, you should clear the user’s session and re-initiate a login.
@vivek - Facing issues with historical data call since yesterday as well... Tried with new access token, logged out of other instances, etc but no luck... Also - all other functions such as placeorder(), instruments(), etc are working fine with the same access token and API key combination...
Please throw away whatever access_token you have been using to access historical data until now. You need to do a fresh login, get a brand new access_token, and pass this new access_token to the historical APIs and it should work.
@apind81@virtualKG -- you guys do not have the Historical data API subscription
@kumar_krishnan - you haven't created a Connect app. You only have the publisher app. Unless you create a Connect app, you will not get access to any APIs.
I'd like to clarify something. Historical API is not bundled with Connect as explained on the homepage and within your developer console. We'd disabled authentication on the historical data APIs for a while for legacy/testing reasons, but we re-enabled authentication recently. If you were accessing the historical APIs (without subscribing to it in your developer console), it's not going to work anymore unfortunately.
Thanks for clarifying @Kailash, infact I had connect and also publish Apps, I did not use connect much, so i have discontinued, Anyway it means going forward Publisher App will not be able to pull historical Data. as per the developer console "No API access. HTML/Javascript buttons and basket.", in that case if I need to pull historical data, I need to continue on Connect APP is my understanding correct?
@kumar_krishnan The Connect API will give you live data via the websockets. You'll have to subscribe to the Historical Data API to pull historical data.
@Nikhil.A , You mean to say ,using connect API, I cannot pull historical data any more, that means Connect API is only trading API with realtime websocket data (No Historical data) . In that case Is it possible to subscribe only for historical data from console.
@kumar_krishnan Historical data has always been a separate addon to Kite Connect. You were not meant to pull data from it without subscribing to the Historical addon (but as I said, we'd left it open for a while for technical reasons).
I'm afraid it's an addon to Kite Connect, so subscribing to just the data is not possible.
access_token
andapi_key
Seems there is a problem with kite.trade
Observed, some other users in the forum also facing the same problem when accessing the historical data!!!
See the error below:
@kumar_krishnan - you haven't created a Connect app. You only have the publisher app. Unless you create a Connect app, you will not get access to any APIs.
I'd like to clarify something. Historical API is not bundled with Connect as explained on the homepage and within your developer console. We'd disabled authentication on the historical data APIs for a while for legacy/testing reasons, but we re-enabled authentication recently. If you were accessing the historical APIs (without subscribing to it in your developer console), it's not going to work anymore unfortunately.
I'm afraid it's an addon to Kite Connect, so subscribing to just the data is not possible.