From f9e72dc79f66650e20c63b8dab95a1af8ab34bbf Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 12 Jan 2022 22:17:07 +0800 Subject: [PATCH] binance: subscribe binance depth10@100ms --- pkg/exchange/binance/convert.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/exchange/binance/convert.go b/pkg/exchange/binance/convert.go index b014ca2a3..4c58183a9 100644 --- a/pkg/exchange/binance/convert.go +++ b/pkg/exchange/binance/convert.go @@ -562,7 +562,10 @@ func convertSubscription(s types.Subscription) string { case types.KLineChannel: return fmt.Sprintf("%s@%s_%s", strings.ToLower(s.Symbol), s.Channel, s.Options.String()) case types.BookChannel: - return fmt.Sprintf("%s@depth", strings.ToLower(s.Symbol)) + // depth values: 5, 10, 20 + // Stream Names: @depth OR @depth@100ms. + // Update speed: 1000ms or 100ms + return fmt.Sprintf("%s@depth10@100ms", strings.ToLower(s.Symbol)) case types.BookTickerChannel: return fmt.Sprintf("%s@bookTicker", strings.ToLower(s.Symbol)) }