Live subscribe

Hello !

I’m trying to use a single ws connection to get both user data and live ticker updates.
I create the connection using the listen key (using either /ws/ or stream=) and some time later send the subscribe message.
I’m getting the correct null response stating that the subscribe succeeded, but instead of ticker updates I’m only getting {“result”:null,“id”:1} messages repeatedly.

I’m not sure what I’m doing wrong

It may be the case that the stream subscribed to does not exist. The server does not validate stream names and will return the same response if the stream name does not exist.

To confirm this is the case, use the LIST_SUBSCRIBTIONS messages to list the subscribed streams.

In addition, symbols in stream names should be provided in lowercase. (Ex: btcusdt@aggTrade)

For testing purposes I’m only sending one subscription message using btcusdt@aggTrade

I should add that if I open the connection using the listen key and /btcusdt@aggTrade it works as intended.
However my use case is to have live subscribe/unsubscribe

Could you provide the full url used to connect, the body of the subscribe message, and the response when sending a LIST_SUBSCRIBTIONS message.

Sure

I’m using
wss://stream.binance.com:9443/stream?streams=

and the message is
{“method”:“SUBSCRIBE”,“params”:[“btcusdt@aggTrade”],“id”:1}

In the meantime I found out that I was using an extension named “permessage-deflate”, and if I remove that the subscription works as intended, and LIST_SUBSCRIPTIONS will return the correct list.
I’ll continue tinkering with my code to see what was going wrong
Thanks for your help !