mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
move packages
This commit is contained in:
parent
9cc4505594
commit
3989531788
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
type ProfitAndLossCalculator struct {
|
|
@ -7,8 +7,8 @@ import (
|
|||
"github.com/sirupsen/logrus"
|
||||
"github.com/slack-go/slack"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/slack/slackstyle"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/slack/slackstyle"
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
type ProfitAndLossReport struct {
|
|
@ -4,9 +4,9 @@ import (
|
|||
"context"
|
||||
"sync"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/exchange/binance"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
"github.com/c9s/bbgo/exchange/binance"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
|
|
@ -3,8 +3,8 @@ package bbgo
|
|||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
type Context struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"math"
|
||||
"time"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
type MovingAverageIndicator struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ package bbgo
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
func TestCalculateMovingAverage(t *testing.T) {
|
||||
|
|
|
@ -6,9 +6,9 @@ import (
|
|||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
"github.com/c9s/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
)
|
||||
|
||||
type BackTestStream struct {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
package bbgo
|
||||
|
||||
import (
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
func (store *MarketDataStore) OnUpdate(cb KLineCallback) {
|
||||
|
|
|
@ -7,8 +7,8 @@ import (
|
|||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package bbgo
|
||||
|
||||
import (
|
||||
"github.com/c9s/bbgo/pkg/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
type Notifier interface {
|
||||
|
|
|
@ -2,12 +2,13 @@ package bbgo
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"math"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
func zero(a float64) bool {
|
||||
|
|
|
@ -2,10 +2,12 @@ package bbgo
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
func TestStockManager(t *testing.T) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package bbgo
|
||||
|
||||
import (
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
type Interval string
|
||||
|
|
|
@ -10,11 +10,11 @@ import (
|
|||
"github.com/jmoiron/sqlx"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/config"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/exchange/binance"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/service"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/bbgo/config"
|
||||
"github.com/c9s/bbgo/exchange/binance"
|
||||
"github.com/c9s/bbgo/service"
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
// MarketStrategy represents the single Exchange strategy
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
package binance
|
||||
|
||||
import ()
|
||||
|
||||
func (f *DepthFrame) OnReady(cb func(snapshotDepth DepthEvent, bufEvents []DepthEvent)) {
|
||||
f.readyCallbacks = append(f.readyCallbacks, cb)
|
||||
}
|
|
@ -10,8 +10,8 @@ import (
|
|||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
)
|
||||
|
||||
var log = logrus.WithFields(logrus.Fields{
|
|
@ -9,9 +9,9 @@ import (
|
|||
"github.com/adshao/go-binance"
|
||||
"github.com/valyala/fastjson"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/fixedpoint"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
"github.com/c9s/bbgo/fixedpoint"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
)
|
||||
|
||||
/*
|
|
@ -7,12 +7,12 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
"github.com/c9s/bbgo/util"
|
||||
|
||||
"github.com/adshao/go-binance"
|
||||
"github.com/gorilla/websocket"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
type StreamRequest struct {
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
package binance
|
||||
|
||||
import ()
|
||||
|
||||
func (s *Stream) OnConnect(cb func(stream *Stream)) {
|
||||
s.connectCallbacks = append(s.connectCallbacks, cb)
|
||||
}
|
|
@ -7,8 +7,8 @@ import (
|
|||
"github.com/pkg/errors"
|
||||
"github.com/valyala/fastjson"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/fixedpoint"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/fixedpoint"
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
var ErrIncorrectBookEntryElementLength = errors.New("incorrect book entry element length")
|
|
@ -4,8 +4,8 @@ import (
|
|||
"github.com/pkg/errors"
|
||||
"github.com/valyala/fastjson"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
)
|
||||
|
||||
type BaseEvent struct {
|
|
@ -5,8 +5,8 @@ import (
|
|||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
max "github.com/c9s/bbgo/pkg/bbgo/exchange/max/maxapi"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
max "github.com/c9s/bbgo/exchange/max/maxapi"
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
var logger = log.WithField("exchange", "max")
|
|
@ -8,9 +8,9 @@ import (
|
|||
"github.com/sirupsen/logrus"
|
||||
"github.com/slack-go/slack"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
"github.com/c9s/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
)
|
||||
|
||||
type SlackAttachmentCreator interface {
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/types"
|
||||
"github.com/c9s/bbgo/types"
|
||||
)
|
||||
|
||||
type TradeSync struct {
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
"github.com/slack-go/slack"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
"github.com/c9s/bbgo/util"
|
||||
)
|
||||
|
||||
type KLineOrWindow interface {
|
|
@ -1,6 +1,7 @@
|
|||
package types
|
||||
|
||||
import ("testing"
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
|
@ -5,8 +5,8 @@ import (
|
|||
"sort"
|
||||
"sync"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/bbgo/fixedpoint"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/sigchan"
|
||||
"github.com/c9s/bbgo/fixedpoint"
|
||||
"github.com/c9s/bbgo/sigchan"
|
||||
)
|
||||
|
||||
type PriceVolume struct {
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
package types
|
||||
|
||||
import ()
|
||||
|
||||
func (b *OrderBook) OnLoad(cb func(book *OrderBook)) {
|
||||
b.loadCallbacks = append(b.loadCallbacks, cb)
|
||||
}
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
package types
|
||||
|
||||
import ()
|
||||
|
||||
func (stream *StandardStream) OnTrade(cb func(trade *Trade)) {
|
||||
stream.tradeCallbacks = append(stream.tradeCallbacks, cb)
|
||||
}
|
|
@ -2,9 +2,11 @@ package types
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
"github.com/slack-go/slack"
|
||||
"time"
|
||||
|
||||
"github.com/slack-go/slack"
|
||||
|
||||
"github.com/c9s/bbgo/util"
|
||||
)
|
||||
|
||||
type Trade struct {
|
Loading…
Reference in New Issue
Block a user