Subscribe to Full D30 mode - Websocket

I want to stream real-time full market depth (full_d30) data for 150 option contracts (50 Nifty, 50 BankNifty, and 50 Sensex).
This is required for analyzing option chain strikes along with complete bid-ask depth and Greeks.

However, I noticed the following:

  • A single WebSocket connection allows a maximum of 50 instruments in full_d30 mode.

  • As per Upstox documentation:

    • Plus plan users can open up to 5 simultaneous WebSocket connections.

    • The combined limit is 1500 instruments across all active WebSocket connections.

So in theory, I should be able to subscribe like this:
3 WebSockets × 50 instruments each = 150 instruments (Nifty + BankNifty + Sensex)

But in practice:

  • Only the first WebSocket connection receives data.

  • The second and third WebSocket connections connect but do not receive any feed.

  • No error is shown, but the feeds are inactive.


My Questions:

  1. Is it possible to stream more than 50 instruments in full_d30 mode using multiple WebSocket connections?

  2. Is there any restriction (technical or policy-based) that prevents multiple active full_d30 connections per user/token?

  3. Do we need to use separate ApiClient instances, access tokens, or client IDs to make multiple WebSocket connections work?

  4. If this is not supported currently, is there an alternative approach recommended by Upstox for streaming more than 50 option contracts with full market depth?


System Setup (For Context):

  • Plan: Upstox Plus Member

  • Instruments:

    • 50 NIFTY Option contracts

    • 50 BANKNIFTY Option contracts

    • 50 SENSEX Option contracts

  • WebSocket Mode: full_d30

  • Using Python SDK: upstox-python

  • Attempting 3 WebSocket connections, each with its own instrument list.


I’d really appreciate clarification or guidance from the Upstox team or community developers.

Thank you!

Hi Mohit :waving_hand:,

Let’s clarify the limit details for WebSocket subscriptions.

Here, combined limit refers to the total number of instruments subscribed across all modes and all connections
This includes instruments subscribed in ltp, option_greek, full, and full_d30 modes.

For example:
If you are subscribed to 40 instruments in full_d30 mode and 60 in full mode, you can subscribe to up to 1400 instruments in ltp mode.

The restriction on the number of instruments applies per user, not per connection.

So, even if you open multiple WebSocket connections, a single user can subscribe to a maximum of 50 instruments in full_d30 mode.


:speech_balloon: Answers to your specific questions

Is it possible to stream more than 50 instruments in full_d30 mode using multiple WebSocket connections?

:cross_mark: No, this is not possible. The 50-instrument limit applies per user.


Is there any restriction (technical or policy-based) that prevents multiple active full_d30 connections per user/token?

:white_check_mark: No, you can have multiple WebSocket connections in full_d30 mode.
For example:

  • WebSocket 1 → 20 instruments
  • WebSocket 2 → 20 instruments
  • WebSocket 3 → 10 instruments
    This setup works perfectly fine, as long as the total per user does not exceed 50 instruments.

Do we need to use separate ApiClient instances, access tokens, or client IDs to make multiple WebSocket connections work?

No, it’s not required.
You can use the same ApiClient instance and create multiple WebSocket connections by re-initializing the MarketDataStreamerV3 class, as shown below:

upstox_client.MarketDataStreamerV3(
    upstox_client.ApiClient(configuration)
)

If this is not supported currently, is there an alternative approach recommended by Upstox for streaming more than 50 option contracts with full market depth?

As of now, there is a hard limit of 50 instruments per user in full_d30 mode.
Since full_d30 data carries significantly more packets and depth information, increasing this limit may impact performance and bandwidth.

Thanks!

1 Like

Really appreciate your reply, Thanks.

1 Like