mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
pkg/exchange: we don't need the fee rate in the public stream
This commit is contained in:
parent
f90ef3372d
commit
29550f0013
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user