Skip to content

feat(v3.5.0, #653): add support for Binance USDM Futures base URL split & migration - #654

Merged
tiagosiebler merged 8 commits into
masterfrom
wssplit
Mar 13, 2026
Merged

feat(v3.5.0, #653): add support for Binance USDM Futures base URL split & migration#654
tiagosiebler merged 8 commits into
masterfrom
wssplit

Conversation

@tiagosiebler

@tiagosiebler tiagosiebler commented Mar 13, 2026

Copy link
Copy Markdown
Member

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:

Additional Information

PR Checklist

As part of the PR, make sure you have:

  • No breaking changes / documented all breaking changes clearly.
  • Updated & checked that all tests pass.
  • Increased the version number in the package.json
  • Checked npm install runs without issue.
  • Included the package-lock.json, if it changed after npm install
  • Checked npm run build runs without issue.
  • Updated the endpoint map (optional, if you know how).
  • Run llms.txt generator (optional, if you know how).

@tiagosiebler
tiagosiebler merged commit b248fa6 into master Mar 13, 2026
5 of 6 checks passed
@tiagosiebler
tiagosiebler deleted the wssplit branch March 13, 2026 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant