Livefeed using sockets
-
@dorje
We have identified an issue in our Python websocket API. We are looking into the same. -
@bhaveshjain ok ..
-
Hi @dorje , our development team will connect with you asap.
-
It looks like issue is with the python, i think they have not started python websocket streaming service, there is no word from @bhaveshjain regarding this matter, and there is no proper documentation for python ,
so I'm hoping @bhaveshjain could clarify this matter, and how long it will take when service will resume for python. -
@vishant I tried the same code before also but it's not working.
-
Hi @rjbanna,
I am using Node SDK - https://github.com/angelbroking-github/smartapi-javascript
Also, I am using the same code which is mentioned in the link above.
let web_socket = new WebSocket({
client_code: "CLIENT_CODE",
feed_token: "FEED_TOKEN",
script: "nse_cm|2885&nse_cm|1594" //exchange|token for multi stocks use & seperator
});web_socket.connect();
web_socket.on('tick', receiveTick)function receiveTick(data) {
console.log("Receive stock ticks::", data)
}You can also try copy pasting the code from Python SDK, it should work.
-
@vishant No, I'm not getting the desired output. I had tried the given Python code during the market hours also, but it was giving me the same error. May be it is the issue with Python SDK or I'm missing some parameters.
-
I have tried to implement live feed using NodeJS SDK & getting the below-mentioned output. If you are receiving a similar result, your code is perfect & it should provide you actual data while the market is live (9:00 - 3:30). You just have to re-run code when the market is live, you will get output for every seconds on your terminal/console.
Console Output:
ak:'nk'
msg:'cn'
task:'cn'Hope this might help you.
-vishant
-
@bhaveshjain Any updates on this?
-
@bhaveshjain hi bhavesh please provide a clear understanding of how to stream tick data, as i have been through documentation but it is not clear how to do the same , as mentioned by @rjbanna i'm also getting the same error , if there is any other method to do the same please let us know,