Running multiple instances of the Java Clinet !!!

velms
velms edited March 2018 in Java client
I am able to run two instances of my java client and tested it during off-market hours. Works like a charm.
Can i able to run two instances without any issues from the API side . Mean any restrictions from zerodha side ?
I use only one websocket for listening to the tickers per client ( and i do login twice with the same tokens in both the instances ).

@sujith
Tagged:
  • sujith
    You need to login only once.
    If you do it two times from the same api_key then you will be clearing another session.
  • velms
    @sujith

    I am getting access token only once per day and saving access and public token in a file locally.

    And i opened two instances of my app and i do the below steps before using the kite apis for my order management.

    {
    // Initialize kiteconnect
    kiteConnect = new KiteConnect( apiKey );
    // set userId
    kiteConnect.setUserId( userID );
    // Set request token and public token which are obtained from login process.
    kiteConnect.setAccessToken(accessToken);
    kiteConnect.setPublicToken(publicToken);
    }
    I tested it in during market hours and i can fire orders from both the app instances parallely and it works like a charm.

    PS:-
    1) I dont have any requirement to run multiple instances of my app AS OF NOW
    2) I am sharing this with you guys because i am pleasently surprised with this behaviour
This discussion has been closed.