mirror of
https://github.com/c9s/bbgo.git
synced 2024-09-20 08:11:08 +00:00
since we always receive balance update from websocket we do not need to subscribe 1m from the maker exchange
This commit is contained in:
parent
6370b39cde
commit
f80c98b97c
|
@ -120,12 +120,7 @@ func (s *Strategy) CrossSubscribe(sessions map[string]*bbgo.ExchangeSession) {
|
|||
}
|
||||
|
||||
sourceSession.Subscribe(types.BookChannel, s.Symbol, types.SubscribeOptions{})
|
||||
|
||||
makerSession, ok := sessions[s.MakerExchange]
|
||||
if !ok {
|
||||
panic(fmt.Errorf("maker session %s is not defined", s.MakerExchange))
|
||||
}
|
||||
makerSession.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: "1m"})
|
||||
sourceSession.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: "1m"})
|
||||
}
|
||||
|
||||
func aggregatePrice(pvs types.PriceVolumeSlice, requiredQuantity fixedpoint.Value) (price fixedpoint.Value) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user