Migrate Binance futures WS to /market/stream endpoint

Binance permanently decommissioned wss://fstream.binance.com/stream on
2026-04-23. Connections to the legacy URL still complete the handshake
but receive no kline data — the server silently withholds frames and
read.next() blocks forever, so realtime updates stop while historical
REST sync still works. This caused frontend charts to freeze and
watchlist prices to remain at 0.00.

Per Binance's WebSocket Change Notice, kline streams now belong to the
/market routing class. Updating the combined-stream URL to
wss://fstream.binance.com/market/stream?streams=... restores realtime
delivery without any other code change (combined-stream syntax is
unchanged).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
0xcathiefish
2026-05-03 04:22:52 +00:00
parent 7962415d56
commit d40498e5b6
+1 -1
View File
@@ -304,7 +304,7 @@ impl BinanceCollector {
let streams: Vec<String> = symbols.iter()
.map(|s| format!("{}@kline_1m", s.to_lowercase()))
.collect();
let url = format!("wss://fstream.binance.com/stream?streams={}", streams.join("/"));
let url = format!("wss://fstream.binance.com/market/stream?streams={}", streams.join("/"));
let (ws_stream, _) = connect_async(&url)
.await