What time in the morning can I receive the new request_token ?

quicksilverm
quicksilverm edited January 2017 in General
Hi,
I am trying to run https://kite.trade/connect/login?api_key= at 8.45 AM but I only get response https://kite.zerodha.com/connect/login?sess_id=yopiac9wa4vaw1zkjapb1g&api_key=

I know when I will try this - if let's say at 10 AM, I would be successful. But it's a pain to keep trying...

Yesterday, I wasn't successful until almost 9.30 AM. The sit itself seems to be painfully slow and while running my subscription of the ticks I got disconnected tons of times...

Is there a fixed time when user starts receiving the new request_token for the morning or is it random ?
  • sujith
    Hi,
    If you are looking at url like this https://kite.zerodha.com/connect/login?sess_id=yopiac9wa4vaw1zkjapb1g&api_key= then you are not logged in, just login again and you are good to go.
    The sit itself seems to be painfully slow and while running my subscription of the ticks I got disconnected tons of times...
    Just try reconnecting in onDisconnect callback. Checkout this thread for more info https://kite.trade/forum/discussion/comment/3670/#Comment_3670
  • sujith
    Make sure you won't end up making it infinite loop.
  • quicksilverm
    The login has to be done on kite.trade ? And what time would I get the new request_token ?

  • sujith
    You can login anytime.
    You are looking at the above url because you are not logged in or your login was not successful.

    PS: Your session will be invalid, if you login to any of our platforms also.
  • kivijoshi
    Hi sujith,
    In your last response you wrote session will be invalid if login to other platform happens.

    So for example..lets say i start the automated trading algo looping. And meanwhile I login to the Kite web. Then will my automated trading program will stop due to invalid session?
  • sujith
    Hi @kivijoshi,
    There are two scenarios here,
    1. You are logged in on Kite connect and you login on Kite web. It won't logout user. You click on logout then you are logged out everywhere.
    2. You are logged in on Kite connect and you login on other platforms like PI, trade.zerodha.com or NEST. You are logged out of KiteConnect and there will be new access token for new login.
  • quicksilverm
    Hi Sujith,

    Two queries and putting it simply.

    1. If I login 7 AM in the morning, would i be able to collect my new token which would be valid for the enitre trading day ?
    2. If I want to know how my trades are going for the day where can I check it ( other than to program it ) - without breaking my automated trading and invalidating the current request_token ?
  • sujith
    @quicksilverm,
    1. If I login 7 AM in the morning, would i be able to collect my new token which would be valid for the enitre trading day ?
    There is no way we can differentiate between yesterday's and today's access token.Even if you login at 7 AM. You will be logged out when all access tokens are flushed out.
    In addition, if your access_token is valid next morning at 7 AM, then what is the point of logging in again.
    2. If I want to know how my trades are going for the day where can I check it ( other than to program it ) - without breaking my automated trading and invalidating the current request_token ?
    You can look at all trades on Kite web or Kite Android. Just don't click on logout.
  • quicksilverm
    Thanks Sujith. I would naturally like to obtain the request_token after the flush happens. What time would I expect the flush to have finished ? All I want is to have a token which lasts a day. What time should I login for a token where I know and for sure that the token i receive has the ability to last a day. You may respond to me with the presumption that I will not do anything at my end to invalidate the session ( clicking logout or logging in via PI etc )
  • sujith
    @quicksilverm,
    As I mentioned above it is a manual process. I would suggest you to login after 8 AM.
Sign In or Register to comment.