[Python] Not able to connect to Dhan platform websocket

Discussão em 'Python' iniciado por Stack, Agosto 23, 2025.

  1. Stack

    Stack Membro Participativo

    I am not able to connect to Dhan trading platform's live data feed using python & nodejs.

    I have paid for Dhan data apis & generated access token there. The tried the code given at

    Dhanhq-py github repo for marketfeed usage

    This gave below error message

    no close frame received or sent


    Then I tried connecting using websocket library & got same message.

    Also tried using DhanHQ-js and got error as

    WebSocket error: Error: Unexpected server response: 400


    I have checked the access token is not expired yet and client id is correct.

    What am I doing wrong? Has anyone ever got it working?

    Please help.

    Continue reading...

Compartilhe esta Página