mirror of
https://github.com/exchanges-lab/view.git
synced 2026-08-04 21:31:22 +08:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user