From d40498e5b645a0048ec6579aab3e2b1447f61624 Mon Sep 17 00:00:00 2001 From: 0xcathiefish <72328723+0xcathiefish@users.noreply.github.com> Date: Sun, 3 May 2026 04:22:52 +0000 Subject: [PATCH] Migrate Binance futures WS to /market/stream endpoint MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- backend/src/binance_collector.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/binance_collector.rs b/backend/src/binance_collector.rs index d876287..7388af0 100644 --- a/backend/src/binance_collector.rs +++ b/backend/src/binance_collector.rs @@ -304,7 +304,7 @@ impl BinanceCollector { let streams: Vec = 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