I am new to Api trading and phython. I am learning… Can anyone help to login my account in Dhan Api. I am not able to login account.
when i am login through dhan api. this msg is shown… " ModuleNotFoundError: No module named ‘websockets’
Any can help me.
I tried implementing the DhanHQ Live feed using WebSockets in Android kotlin. However, after sending the data in required format it never hits the OnMessage to read the data. Do you have any sample code for Android?
Usually the issue happens in authorising/sending the subscription packets itself. Once that is done, the data is published irrespective of the client device. Can you check the same if that is as per documentation itself?
Yes, it is as per documentation. Authorisation was successful, and after which I’m sending only 1 instrument. Basically it should a byte size of 108. It is same as per the documentation, however, after I send, it is not hitting back the OnMessage to read the data. Since it’s binary, it gets a bit difficult to see if the bytes format are proper.
I guess this is where the issue is. Even if you are subscribing to 1 instrument, the byte size should be 2187, as you will have to send the rest of instrument list padded as 0.