From 07eb723da42edad9f5a7bb19db9fa640e6d0e9c4 Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 24 Jan 2024 17:51:02 +0800 Subject: [PATCH] binance: support more depth level --- pkg/exchange/binance/convert.go | 6 +++++- pkg/types/stream.go | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/exchange/binance/convert.go b/pkg/exchange/binance/convert.go index 4fdc4a5f1..8aae013f6 100644 --- a/pkg/exchange/binance/convert.go +++ b/pkg/exchange/binance/convert.go @@ -318,9 +318,13 @@ func convertSubscription(s types.Subscription) string { case types.DepthLevel5: n += "5" - case types.DepthLevelMedium: + case types.DepthLevel10: + n += "10" + + case types.DepthLevel20, types.DepthLevelMedium: n += "20" + // default to full case types.DepthLevelFull: default: diff --git a/pkg/types/stream.go b/pkg/types/stream.go index 5a937e5fb..a2246ed68 100644 --- a/pkg/types/stream.go +++ b/pkg/types/stream.go @@ -549,6 +549,7 @@ const ( DepthLevelMedium Depth = "MEDIUM" DepthLevel1 Depth = "1" DepthLevel5 Depth = "5" + DepthLevel10 Depth = "10" DepthLevel15 Depth = "15" DepthLevel20 Depth = "20" DepthLevel50 Depth = "50"