Skip to content

Commit

Permalink
binance: support more depth level
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Jan 24, 2024
1 parent 805fea3 commit 07eb723
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/exchange/binance/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
1 change: 1 addition & 0 deletions pkg/types/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 07eb723

Please sign in to comment.