How to check again and again I'm logged in?

Sowmay
I'm using Kite Connect JS module. How can I check again and again (every 5 seconds) that I'm logged in and the access token is still valid?

My app workflow goes like this:

An access token is generated whenever I login with zerodha on my app.
Then all other kite module functions (holdings(), margins() etc) are called on an event which occurs every 10 minutes.

Currently, I'm calling holding() every 5 seconds to check whether logged in or not, but is there any easy way (or any API function) which can be called for this specific purpose. Any suggestions?
Tagged:
  • sujith
    Hi @Sowmay,
    Please don't bombard the server with unnecessary requests.
    If you log in once in morning, you will stay logged in till next trading session.

    The only reason you might be logged out is because you logged into any of our other trading platforms like Pi or NEST.
    It is recommended to use Kite for monitoring purpose.

    PS: If you log into Pi or NEST you are logged out everywhere other than the current trading terminal.
    If you log out of kite then you are logged out everywhere.
Sign In or Register to comment.