From 9953a307177b32df92a6026029cfcdcbfb6e1881 Mon Sep 17 00:00:00 2001 From: c9s Date: Wed, 19 Jan 2022 13:08:50 +0800 Subject: [PATCH] xgap: fix subscribe interval --- pkg/strategy/xgap/strategy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/strategy/xgap/strategy.go b/pkg/strategy/xgap/strategy.go index 12a8974f7..b41665f59 100644 --- a/pkg/strategy/xgap/strategy.go +++ b/pkg/strategy/xgap/strategy.go @@ -131,7 +131,7 @@ func (s *Strategy) CrossSubscribe(sessions map[string]*bbgo.ExchangeSession) { } sourceSession.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: "1m"}) - sourceSession.Subscribe(types.BookChannel, s.Symbol, types.SubscribeOptions{Depth: "5"}) + sourceSession.Subscribe(types.BookChannel, s.Symbol, types.SubscribeOptions{}) tradingSession, ok := sessions[s.TradingExchange] if !ok { @@ -139,7 +139,7 @@ func (s *Strategy) CrossSubscribe(sessions map[string]*bbgo.ExchangeSession) { } tradingSession.Subscribe(types.KLineChannel, s.Symbol, types.SubscribeOptions{Interval: "1m"}) - tradingSession.Subscribe(types.BookChannel, s.Symbol, types.SubscribeOptions{Interval: "1m"}) + tradingSession.Subscribe(types.BookChannel, s.Symbol, types.SubscribeOptions{}) } func (s *Strategy) CrossRun(ctx context.Context, _ bbgo.OrderExecutionRouter, sessions map[string]*bbgo.ExchangeSession) error {