Question: Single raw stream or a combined stream

Hey all,

im a little uncertain about this statement in Doc´s:

Streams can be access either in a single raw stream or a combined stream
A single connection is only valid for 24 hours; expect to be disconnected at the 24 hour mark

Is a combined stream (i am using two streams, 1minKline and 5minKline in my request) also a single stream?

And how can i get around the disconnection?

Thanks for any advice!

Single stream example:
‘wss://stream.binance.com:9443/ws/bnbusdt@ticker’

Combined streams example:
‘wss://stream.binance.com/stream?streams=bnbusdt@depth5/btcusdt@depth5’

To not get disconnected, you need to send pongs back:
The websocket server will send a ping frame every 3 minutes. If the websocket server does not receive a pong frame back from the connection within a 10 minute period, the connection will be disconnected. Unsolicited pong frames are allowed.

Hei,
thanks for your advice!

It was not clear for me, but my assumptions at the beginning turned out right,

I am using a combined stream like below and was wondering why i sometimes get disconnected. But maybe its a problem with the python websocket-client module.

"wss://fstream.binance.com/stream?streams=btcusdt_perpetual@continuousKline_1m/btcusdt_perpetual@continuousKline_5m"

Thanks for your help so far.

1 Like