I want to open a stream for spot, cross and isolated if I use the following syntax
‘wss://stream.binance.com:9443/stream?streams=<listenkey_1>/<listenkey_2>/<listenkey_3>’
It gives me an error and if I do it without the angle brackets it fails but does not throw any error, the socket is only disconnected
What is the right way
It’s without angle brackets, example:
websocat -v "wss://stream.binance.com:9443/stream?streams=qbWFKvjORsw289Xq1DeZbElk2sEGoIg0LyfSDBYW9D3SroFhSMhAzCNouHLF/qeWFKvjORsw289Xq1DeZbElk2sEGoIg0LxfSDBYW9D3SroFhAMhAdCNouHLV/qeWFKvjORsw289Xq1DeZbElk2sEGoIe0LxfXDBYW9D3SroFhSMhAdCMouHLV
(the listed listen keys were randomly created for example purpose, doesn’t work)
if I do it without the angle brackets it fails but does not throw any error, the socket is only disconnected
This might be related with how your local code is written and handles the websocket, using the websocat
command-line tool from my example above, the disconnection doesn’t happen.
2 Likes