Is Zerodho doing some reset of their servers on market days arround 7-8 am?

keerthi
Is Zerodho doing some reset of their servers on market days arround 7-8 am?
Because I am facing some issue my code get some exception and exited around that time.
But it's not happening during the holidays.
Some reseting of the access token.
I am using this code to get ticker data. Is there anything I need to do. I am facing this issue after start to receive ticker .
when market starts
ticker = new KiteTicker({
api_key:xx,
access_token:xx,
});
ticker.autoReconnect(true, 10, 5);
ticker.on("connect", subscribe);
ticker.connect();

after market ends
ticker.unsubscribe([]);
ticker.disconnect();

Do I need to invalidate the access token

connect.invalidateAccessToken();

Even when I login around morning 6 pm access_token got invalidated. So I need to login again after 8-8.30

  • keerthi
    May be some one let me know when is the right time to login?
    Is there a way to keep the login alive for a week or any ? Are you all login every day?
  • MAG
    MAG edited November 2023
    @keerthi if you look at the documentation all this information is available there.

    If you look at the pinned FAQ section of this forum. There is a login flow section. In this section the second last item is "Websocket session flush timings : https://kite.trade/forum/discussion/comment/41282/#Comment_41282"
    If you read that, it is mentioned that "We flush all sessions including APIs and Websocket around 07:30 AM every day"

    If you create your new access token for the day at or after 7:30 am, it wont expire or be flushed. Been doing that for a few years now and I never had an issue with expired/invalid access token.

    And yes we all log in everyday. If you know programming and you script it up the only thing that needs to be done manually is the request token retrival. Everything else can be automated and it takes 5 seconds for me. You cannot have the access token alive for more than a day because thats a exchange mandate / rule that login and access token creation needs to be done everyday.

    Folks, 90% of the questions you ask are all mentioned in the FAQ's. Please go and read the FAQ section in detail before you start trying out stuff on the API and asking the same questions again and again.
  • keerthi
    @MAG Thats great, Thanks for your help
This discussion has been closed.