From 6c1f214d0f629e59eafdcee1a8f065baf496aa63 Mon Sep 17 00:00:00 2001 From: c9s Date: Sat, 11 Jul 2020 15:19:36 +0800 Subject: [PATCH] fix import --- bbgo/exchange/binance/exchange.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/bbgo/exchange/binance/exchange.go b/bbgo/exchange/binance/exchange.go index cfe086df9..6a7eb6b9f 100644 --- a/bbgo/exchange/binance/exchange.go +++ b/bbgo/exchange/binance/exchange.go @@ -2,13 +2,14 @@ package binance import ( "context" - "github.com/adshao/go-binance" - "github.com/c9s/bbgo/pkg/bbgo/types" - types2 "github.com/c9s/bbgo/pkg/bbgo/types" - "github.com/c9s/bbgo/pkg/util" - "github.com/sirupsen/logrus" "strconv" "time" + + "github.com/adshao/go-binance" + + "github.com/c9s/bbgo/pkg/bbgo/types" + "github.com/c9s/bbgo/pkg/util" + "github.com/sirupsen/logrus" ) type Exchange struct { @@ -45,7 +46,7 @@ func (e *Exchange) NewPrivateStream(ctx context.Context) (*PrivateStream, error) }, nil } -func (e *Exchange) SubmitOrder(ctx context.Context, order *types2.Order) error { +func (e *Exchange) SubmitOrder(ctx context.Context, order *types.Order) error { /* limit order example @@ -104,7 +105,7 @@ func (e *Exchange) QueryKLines(ctx context.Context, symbol, interval string, lim return kLines, nil } -func (e *Exchange) QueryTrades(ctx context.Context, symbol string, startTime time.Time) (trades []types2.Trade, err error) { +func (e *Exchange) QueryTrades(ctx context.Context, symbol string, startTime time.Time) (trades []types.Trade, err error) { logrus.Infof("[binance] querying %s trades from %s", symbol, startTime) var lastTradeID int64 = 0 @@ -160,7 +161,7 @@ func (e *Exchange) QueryTrades(ctx context.Context, symbol string, startTime tim return nil, err } - trades = append(trades, types2.Trade{ + trades = append(trades, types.Trade{ ID: t.ID, Price: price, Volume: quantity,