Skip to content

Commit

Permalink
Merge pull request #1429 from c9s/edwin/bybit/get-fee-rate-on-private…
Browse files Browse the repository at this point in the history
…-stream-only
  • Loading branch information
c9s authored Dec 13, 2023
2 parents 4a54611 + 29550f0 commit 2c7e429
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/exchange/bybit/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ func NewStream(key, secret string, userDataProvider StreamDataProvider) *Stream
stream.SetDispatcher(stream.dispatchEvent)
stream.SetHeartBeat(stream.ping)
stream.SetBeforeConnect(func(ctx context.Context) (err error) {
if stream.PublicOnly {
// we don't need the fee rate in the public stream.
return
}

// get account fee rate
go stream.feeRateProvider.Start(ctx)

stream.marketsInfo, err = stream.streamDataProvider.QueryMarkets(ctx)
Expand Down

0 comments on commit 2c7e429

Please sign in to comment.