It looks like you're new here. If you want to get involved, click one of these buttons!
on_noreconnect()
gets invoked, it means all the reconnections attempts have failed (may be because network could not come back up). What is the suggested way of reconnecting?KiteTicker()
followed by ws.connect()
again? (because access token remains valid)
data = kite.generate_session("request_token_here", secret="your_secret")
needs to happen just once a day in order to generate the access token. Once the access token is generated you can save it.And then you just need to initiate the kite authentication to create a connection object and then continue with whatever code you want to execute.
In this case if you look at the example code at https://github.com/zerodha/pykiteconnect/blob/master/examples/ticker.py, you would start with
kws = KiteTicker("your_api_key", "your_access_token")
The
data = kite.generate_session("request_token_here", secret="your_secret")
call should not be run again and again.