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,