How many instruments can we subscribe maximum using Kite Connect 3.0?

harikongu
We can subscribe for up to 1000 instruments on a single WebSocket connection and we can open 3 WebSocket connection. Does this mean we can able to subscribe 3000 instruments?
Tagged:
  • sujith
    As of now, you can open three connections but soon we will restrict it to one connection per api_key.
  • harikongu
    I need more than one connection. So that I can watch instruments in groups. Basically, I need more than one callback to perform different action for different groups.

    kws1 = WebSocket(...)
    kws1.on_tick = on_tick_group1

    kws2 = WebSocket(...)
    kws2.on_tick = on_tick_group2

    If you restrict one connection per api_key, My program will not work. Please let me know if you have alternative ideas to implement my logic.
  • sujith
    You can maintain multiple lists of instruments with categories at your end and from the on_ticks callback, you can keep receiving ticks.
    You need to write a wrapper to separate and write to the corresponding list.
  • MAG
    @sujith: One connection means 1000 instruments. And you made a comment that Zerodha plans to limit each api key to one connection only.
    If someone wants to subscribe to more than 1000 instruments. This can easily happen if I track all the futures for current, near term plus far term plus if I subscribe to the top 500 instruments in the NSE.
  • Guhan
    @sujith, what is the restriction for FULL mode? is it 1000?
  • Shaha
    @sujith Please dont reduce the number of connections. I spare connection is always needed to handle exceptions and background checks. Such restrictions will make kite connect a complete NO NO for developers.
  • gautama
    @sujith whats the status of this now ? Can we still use 3 websockets with one key or not ? And is the max limit of instruments per connection still 1000 ?
  • rakeshr
    What is the status of this now? Can we still use 3 websockets with one key or not? And is the max limit of instruments per connection still 1000?
    Go through the websocket FAQs here.
Sign In or Register to comment.