fix import

This commit is contained in:
c9s 2020-07-11 15:19:36 +08:00
parent a3fa292dc5
commit 6c1f214d0f

View File

@ -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,