fix market data stream initialization

This commit is contained in:
c9s 2021-05-28 03:17:46 +08:00
parent d932a686a0
commit f190b1e66a

View File

@ -255,6 +255,8 @@ func InitExchangeSession(name string, session *ExchangeSession) error {
}
session.Exchange = exchange
session.UserDataStream = exchange.NewStream()
session.MarketDataStream = exchange.NewStream()
session.MarketDataStream.SetPublicOnly()
// pointer fields
session.Subscriptions = make(map[types.Subscription]types.Subscription)