Skip to content

v3.5.0: Add support for Binance USDM Futures base URL split & migration

Choose a tag to compare

@tiagosiebler tiagosiebler released this 13 Mar 14:13
b248fa6

What's Changed

  • feat(v3.5.0, #653): add support for Binance USDM Futures base URL split & migration by @tiagosiebler in #654

Summary

Base URL Split & Migration

On 06/03/2026, Binance announced a routing upgrade to their USDM Futures WebSocket System, titled: "Binance USDⓈ-M Futures WebSocket System Upgrade Notice (2026-03-06)".

Key Highlights:

Binance JavaScript SDK Support

All three dedicated WebSocket base URLs are supported. Each with their own unique WsKey, used to track each unique connection.

Continue to subscribe to market data as before with the dedicated subscribe method, but ensure to provide the connection key depending on the type of market data you are consuming.

Minimal examples:

// ...

// For public (high-frequency public data)
const wsKeyUsdmPublic = WS_KEY_MAP.usdmPublic;
wsClient.subscribe(['btcusdt@bookTicker', 'btcusdt@depth'], wsKeyUsdmPublic);

// For market (regular market data)
const wsKeyUsdmMarket = WS_KEY_MAP.usdmMarket;
wsClient.subscribe(['btcusdt@aggTrade', 'btcusdt@forceOrder'], wsKeyUsdmMarket);

// For user data, continue using the subscribe user data stream method as before.
// The SDK will automatically route to the "private" endpoint for USDM Futures:
wsClient.subscribeUsdFuturesUserDataStream();

Legacy wsClient.subscribe*() methods

If you're using any of the per-topic convenience methods, such as wsClient.subscribeAggregateTrades(...), no change is required. The SDK will automatically route the topic subscription request to the appropriate WS URL.

Further Reading

For detailed examples, refer to the examples in this folder, as well as the following documentation:

Full Changelog: v3.4.4...v3.5.0