WebSocket URL for user data stream on testnet

Hello,

I am trying to test the user data stream on testnet, but unfortunately I can’t connect to it. The documentation says that the websocket url for the testnet is wss://stream.binancefuture.com. However it seems like it only works for market data and does not work for the user data stream (which has a different URL on production).

Can anyone help me to figure out the correct websocket url for the user data stream on testnet?

The url you provided is correct. Have you read the guide on how to use the testnet?

Ok, figured it out… so for the testnet the websocket url is wss://stream.binancefuture.com/ws/{listenKey} whilst for production it should be wss://fstream-auth.binance.com/ws/{listenKey}?listenKey={listenKey}