I getting an error while running python script as "Incorrect `api_key` or `access_token`" . When I am just dealing with historical data then same access token is working but when I am working on script which has order placement it is giving me an error with same access token
I tried to logout from kite web and then regenberate the request token but still getting same error
Your access token might have expired. You need to fetch a new access token. An access token is valid for one whole day. Once you get an access token, you don't have to request it again unless you are logged out.
A request token is valid for a couple of minutes and can be used only once. You should not request for access token for every run. Make sure you store the access token in preferences or a database and reuse it in the next run, and don't call generateSession for every run.
Sorry but I am not getting what I need to do exactly by reading these articles.. Could you please help with proper steps?
A request token is valid for a couple of minutes and can be used only once. You should not request for access token for every run. Make sure you store the access token in preferences or a database and reuse it in the next run, and don't call generateSession for every run.