how many websockets can be created

pratiks
in documentation it is mentioned that
You can subscribe for up to 3000 instruments on a single WebSocket connection and receive live quotes for them.

so how many websockets can be created?
  • rakeshr
    You can go through Websocket FAQs here.
  • aditya_chauhan
    @rakeshr Lets say i have created three KiteTicker/websocket connection using the API kye & generated Access token for the day. What happens to these 3 websocket connections if i create one more by mistake?
  • sujith
    An active connection will not be dropped. It is just that the client app will not be able to reconnect.
  • aditya_chauhan
    aditya_chauhan edited June 2021
    How to handle symbol subscription for these three websockets independently? For Example, I want two specific banknifty option contracts to be streamed on one websocket but other can have 100+ option contract data streaming. How can I achieve the same?

    I am assuming if I subscribe to set of symbols on a day, then I don't have to do it on subsequent days.
  • rakeshr
    How to handle symbol subscription for these three websockets independently?
    These three WebSocket connections are independent of each other when initiated using different interpreter processes i.e run independently of each other in the same or different terminal. So, you can maintain the instrument subscribe list, start/disconnection, etc of each websocket connection independently in the respective code.
    I am assuming if I subscribe to set of symbols on a day, then I don't have to do it on subsequent days.
    An access token is flushed every day EOD(end-of-day). So, you need to initiate a fresh WebSocket connection, using a new access token every trading day. This thread explains more on access token flush timings.
Sign In or Register to comment.