@@ -1583,7 +1583,9 @@ export class WebsocketClient extends EventEmitter {
1583
1583
const lowerCaseSymbol = symbol . toLowerCase ( ) ;
1584
1584
const streamName = 'depth' ;
1585
1585
const wsKey = getWsKeyWithContext ( market , streamName , lowerCaseSymbol ) ;
1586
- const updateMsSuffx = updateMs === 100 ? `@${ updateMs } ms` : '' ;
1586
+
1587
+ const updateMsSuffx = typeof updateMs === 'number' ? `@${ updateMs } ms` : '' ;
1588
+
1587
1589
return this . connectToWsUrl (
1588
1590
this . getWsBaseUrl ( market , wsKey ) +
1589
1591
`/ws/${ lowerCaseSymbol } @${ streamName } ${ levels } ${ updateMsSuffx } ` ,
@@ -1599,6 +1601,8 @@ export class WebsocketClient extends EventEmitter {
1599
1601
*
1600
1602
* - Spot: https://binance-docs.github.io/apidocs/spot/en/#diff-depth-stream
1601
1603
* - USDM Futures: https://binance-docs.github.io/apidocs/futures/en/#diff-book-depth-streams
1604
+ *
1605
+ * Use getContextFromWsKey(data.wsKey) to extract symbol from events
1602
1606
*/
1603
1607
public subscribeDiffBookDepth (
1604
1608
symbol : string ,
@@ -1614,7 +1618,9 @@ export class WebsocketClient extends EventEmitter {
1614
1618
lowerCaseSymbol ,
1615
1619
String ( updateMs ) ,
1616
1620
) ;
1617
- const updateMsSuffx = updateMs === 100 ? `@${ updateMs } ms` : '' ;
1621
+
1622
+ const updateMsSuffx = typeof updateMs === 'number' ? `@${ updateMs } ms` : '' ;
1623
+
1618
1624
return this . connectToWsUrl (
1619
1625
this . getWsBaseUrl ( market , wsKey ) +
1620
1626
`/ws/${ lowerCaseSymbol } @${ streamName } ${ updateMsSuffx } ` ,
0 commit comments