binance: subscribe binance depth10@100ms

This commit is contained in:
c9s 2022-01-12 22:17:07 +08:00
parent 5cc3a88911
commit f9e72dc79f

View File

@ -562,7 +562,10 @@ func convertSubscription(s types.Subscription) string {
case types.KLineChannel: case types.KLineChannel:
return fmt.Sprintf("%s@%s_%s", strings.ToLower(s.Symbol), s.Channel, s.Options.String()) return fmt.Sprintf("%s@%s_%s", strings.ToLower(s.Symbol), s.Channel, s.Options.String())
case types.BookChannel: case types.BookChannel:
return fmt.Sprintf("%s@depth", strings.ToLower(s.Symbol)) // depth values: 5, 10, 20
// Stream Names: <symbol>@depth<levels> OR <symbol>@depth<levels>@100ms.
// Update speed: 1000ms or 100ms
return fmt.Sprintf("%s@depth10@100ms", strings.ToLower(s.Symbol))
case types.BookTickerChannel: case types.BookTickerChannel:
return fmt.Sprintf("%s@bookTicker", strings.ToLower(s.Symbol)) return fmt.Sprintf("%s@bookTicker", strings.ToLower(s.Symbol))
} }