diff --git a/bbgo/exchange/binance/stream.go b/bbgo/exchange/binance/stream.go index 0a04d9b99..a9760c9a1 100644 --- a/bbgo/exchange/binance/stream.go +++ b/bbgo/exchange/binance/stream.go @@ -127,7 +127,7 @@ func (s *PrivateStream) Connect(ctx context.Context, eventC chan interface{}) er func (s *PrivateStream) read(ctx context.Context, eventC chan interface{}) { defer close(eventC) - ticker := time.NewTicker(30 * time.Minute) + ticker := time.NewTicker(10 * time.Minute) defer ticker.Stop() for { diff --git a/bbgo/trader.go b/bbgo/trader.go index 345f5d684..84dcad17a 100644 --- a/bbgo/trader.go +++ b/bbgo/trader.go @@ -11,6 +11,11 @@ import ( "github.com/c9s/bbgo/pkg/bbgo/types" ) +type Strategy interface { + Init(trader *Trader) error + OnNewStream(stream *binance.PrivateStream) error +} + type Trader struct { Notifier *SlackNotifier @@ -22,12 +27,6 @@ type Trader struct { reportTimer *time.Timer } - -type Strategy interface { - Init(trader *Trader) error - OnNewStream(stream *binance.PrivateStream) error -} - func (trader *Trader) RunStrategy(ctx context.Context, strategy Strategy) (chan struct{}, error) { symbol := trader.Context.Symbol