200-level Full Market Depth WebSocket Connection Failed

Hi @Hardik @Mohseen_Usmani @Poornima @Kushagra_Rohatgi @PravinJ

  • Issue: 200-level depth connections fail consistently. 20-level depth works fine on the same account.
    Connection URL tried:

    • wss://full-depth-api.dhan.co/?token=***&clientId=***&authType=2 (SDK root path)

    • wss://full-depth-api.dhan.co/twohundreddepth?token=***&clientId=***&authType=2 (docs path)

  • Both fail identically.
    Subscribe JSON sent after connection:
    {“RequestCode”: 23, “ExchangeSegment”: “NSE_FNO”, “SecurityId”: “40977”}

  • Behavior:

    • WebSocket TCP connection establishes successfully

    • Subscription JSON sent

    • Server resets connection after 3-5 seconds with ResetWithoutClosingHandshake (no data frames received)

    • This repeats on every reconnection attempt (40+ attempts observed)

  • Working comparison: 20-level depth (wss://depth-api-feed.dhan.co/twentydepth) connects and receives data for the same instruments without issues.
    Questions:

    • Is 200-level depth enabled for my account/data plan?

    • Is the 200-level depth server currently operational?

    • Are there specific instruments that support 200-level depth vs not?

Hey @Parthiban_Sub

Can you send in your Client ID along with other details on apihelp@dhan.co? We will look into this scenario.

I tried to connect and subscribe to instruments, it is working fine for me. Will check the logs over here.

@Hardik - Done. Please check.

Hi Team

I am experiencing the same issue reported on MadeForTrade on April 7 and April 9, 2026:

  • Thread 1: “200-level Full Market Depth WebSocket — ResetWithoutClosingHandshake on every connection”

  • Thread 2: “200-level Full Market Depth WebSocket Connection Failed”

ACCOUNT DETAILS Client ID: 1109211446 | Issue Since: April 2026 | Mode: Paper trading (API access active)

ISSUE SUMMARY The 200-level Full Market Depth WebSocket fails completely while 20-level depth and TBT Live Market Feed work perfectly on the same account and instruments.

Connection URLs tried:

  1. wss://full-depth-api.dhan.co/twohundreddepth?token=***&clientId=1109211446&authType=2

  2. wss://full-depth-api.dhan.co/?token=***&clientId=1109211446&authType=2

Both fail identically.

Subscription JSON sent (1 instrument per connection, as per docs):

json

{"RequestCode": 23, "InstrumentCount": 1, "InstrumentList": [{"ExchangeSegment": "NSE_FNO", "SecurityId": "66688"}]}

BEHAVIOUR OBSERVED

  1. WebSocket TCP connection establishes successfully

  2. Subscription JSON sent immediately after connect

  3. Server sends zero data packets (raw_msg_count = 0)

  4. Server drops connection after 3-5 seconds with “Connection to remote host was lost”

  5. Repeats on every reconnect attempt (30+ attempts observed)

WORKING COMPARISON (same account)

  • CONN-4 TBT Live Market Feed → :white_check_mark: Working perfectly

  • CONN-2 20-level depth → :white_check_mark: Working perfectly

  • CONN-REST Options snapshot → :white_check_mark: Working perfectly

  • Only CONN-5 200-level depth fails

REQUEST

  1. Please confirm whether 200-level Full Market Depth is enabled for Client ID 1109211446

  2. If not enabled, please activate it

  3. If already enabled, please check server-side logs — zero bytes received suggests silent subscription rejection

As Hardik confirmed on April 9, the 200-depth server was operational on his end — which points to a per-account activation issue, not a server outage.

This feed is critical for my BankNifty trading system (BAIR depth scoring from levels 11–200). Please advise at the earliest.

Thank you. Client ID: 1109211446

Hi @Hardik @PravinJ @Poornima @Prithvi @Pratham_Gada

Following up on ticket #5519522. We re-tested the 200-level depth feed on last friday on a live Google Meet screen-share with Dhan’s tech / API team, using Dhan’s own reference Python program with a freshly-generated access token and my client ID — and it still failed to fetch. Same symptom as before (ResetWithoutClosingHandshake within seconds of subscribing). The Dhan engineer on the call observed the failure live on my screen.

Given this was reproduced end-to-end with your own team watching, it no longer looks like a client-side issue. Can we check this openly with the wider community? If no one is currently receiving 200-level depth data, this is a server-side problem.

Could you raise it in the open channel with a suitable tag — something like #depth-200-status — and ask: “Is anyone on the depth-200 feed actually receiving data right now?”

Hey @Parthiban_Sub

As I can see, the team is already in touch with you to debug the issue. From our end, there are thousands of users who are seamlessly subscribed to 200 market depth and receiving data.

We will ensure this issue is resolved for you at the earliest.

Hey @Om_kumar_Singh

Just one question here, do you have an active data subscription? Also, since it is a subscription failure, if you can check whether the Client ID/Access token is validated.

Hi @Hardik ,

We have isolated the root cause of our 2-week depth-200 issue
(Ticket #5519522). The endpoint wss://full-depth-api.dhan.co/
rejects access tokens with tokenConsumerType=“APP” but accepts
tokens with tokenConsumerType=“SELF”.

Tested today (2026-04-28) using your official Python SDK
dhanhq==2.2.0rc1, same script, same SecurityId 74147,
only token source changed:

  • APP token (from POST /app/generateAccessToken, our TOTP flow):
    subscribe accepted, then immediate reset, zero frames.

  • SELF token (from web.dhan.co > Generate Access Token button):
    streamed 1187 depth-200 frames in 30 seconds. Works perfectly.

All 4 other paths (main feed, depth-20, order-update, REST)
work with BOTH token types on the same account at the same minute.
Only depth-200 discriminates.

Three quick questions:

  1. Is APP-token rejection on depth-200 intentional?

  2. Is there a programmatic SELF-mint API?

  3. Does GET /v2/RenewToken preserve tokenConsumerType=SELF?

Happy to share the actual JWTs privately and run any diagnostic.
This is blocking our production rollout. Thanks!