mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
move files into pkg
This commit is contained in:
parent
5a3c043b43
commit
3d5507a053
12
cmd/pnl.go
12
cmd/pnl.go
|
@ -11,12 +11,12 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/c9s/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/bbgo"
|
||||
"github.com/c9s/bbgo/exchange/binance"
|
||||
"github.com/c9s/bbgo/exchange/max"
|
||||
"github.com/c9s/bbgo/service"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/accounting"
|
||||
"github.com/c9s/bbgo/pkg/bbgo"
|
||||
"github.com/c9s/bbgo/pkg/exchange/binance"
|
||||
"github.com/c9s/bbgo/pkg/exchange/max"
|
||||
"github.com/c9s/bbgo/pkg/service"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -13,11 +13,11 @@ import (
|
|||
"github.com/spf13/viper"
|
||||
|
||||
"github.com/c9s/bbgo/cmd/cmdutil"
|
||||
"github.com/c9s/bbgo/exchange/max"
|
||||
maxapi "github.com/c9s/bbgo/exchange/max/maxapi"
|
||||
"github.com/c9s/bbgo/fixedpoint"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
"github.com/c9s/bbgo/pkg/exchange/max"
|
||||
maxapi "github.com/c9s/bbgo/pkg/exchange/max/maxapi"
|
||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
)
|
||||
|
||||
func init() {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"log"
|
||||
"os"
|
||||
|
||||
maxapi "github.com/c9s/bbgo/exchange/max/maxapi"
|
||||
maxapi "github.com/c9s/bbgo/pkg/exchange/max/maxapi"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
type ProfitAndLossCalculator struct {
|
|
@ -7,8 +7,8 @@ import (
|
|||
"github.com/sirupsen/logrus"
|
||||
"github.com/slack-go/slack"
|
||||
|
||||
"github.com/c9s/bbgo/slack/slackstyle"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/slack/slackstyle"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
type ProfitAndLossReport struct {
|
|
@ -4,9 +4,9 @@ import (
|
|||
"context"
|
||||
"sync"
|
||||
|
||||
"github.com/c9s/bbgo/exchange/binance"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
"github.com/c9s/bbgo/pkg/exchange/binance"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
|
@ -3,8 +3,8 @@ package bbgo
|
|||
import (
|
||||
"sync"
|
||||
|
||||
"github.com/c9s/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/accounting"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
type Context struct {
|
|
@ -4,7 +4,7 @@ import (
|
|||
"math"
|
||||
"time"
|
||||
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
type MovingAverageIndicator struct {
|
|
@ -3,7 +3,7 @@ package bbgo
|
|||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
func TestCalculateMovingAverage(t *testing.T) {
|
|
@ -6,9 +6,9 @@ import (
|
|||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/c9s/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
"github.com/c9s/bbgo/pkg/accounting"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
)
|
||||
|
||||
type BackTestStream struct {
|
|
@ -3,7 +3,7 @@
|
|||
package bbgo
|
||||
|
||||
import (
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
func (store *MarketDataStore) OnUpdate(cb KLineCallback) {
|
|
@ -7,8 +7,8 @@ import (
|
|||
|
||||
"github.com/pkg/errors"
|
||||
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
)
|
||||
|
||||
var (
|
|
@ -1,8 +1,8 @@
|
|||
package bbgo
|
||||
|
||||
import (
|
||||
"github.com/c9s/bbgo/accounting"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/accounting"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
type Notifier interface {
|
|
@ -8,7 +8,7 @@ import (
|
|||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
func zero(a float64) bool {
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
func TestStockManager(t *testing.T) {
|
|
@ -1,7 +1,7 @@
|
|||
package bbgo
|
||||
|
||||
import (
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
type Interval string
|
|
@ -10,11 +10,11 @@ import (
|
|||
"github.com/jmoiron/sqlx"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"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"
|
||||
"github.com/c9s/bbgo/pkg/accounting"
|
||||
"github.com/c9s/bbgo/pkg/bbgo/config"
|
||||
"github.com/c9s/bbgo/pkg/exchange/binance"
|
||||
"github.com/c9s/bbgo/pkg/service"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
// MarketStrategy represents the single Exchange strategy
|
|
@ -10,8 +10,8 @@ import (
|
|||
|
||||
"github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
"github.com/c9s/bbgo/pkg/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/fixedpoint"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
)
|
||||
|
||||
/*
|
|
@ -7,12 +7,12 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/c9s/bbgo/util"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
|
||||
"github.com/adshao/go-binance"
|
||||
"github.com/gorilla/websocket"
|
||||
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
type StreamRequest struct {
|
|
@ -10,9 +10,9 @@ import (
|
|||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
maxapi "github.com/c9s/bbgo/exchange/max/maxapi"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
maxapi "github.com/c9s/bbgo/pkg/exchange/max/maxapi"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
)
|
||||
|
||||
type Exchange struct {
|
|
@ -11,7 +11,7 @@ import (
|
|||
"github.com/pkg/errors"
|
||||
"github.com/valyala/fastjson"
|
||||
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
type PublicService struct {
|
|
@ -7,8 +7,8 @@ import (
|
|||
"github.com/pkg/errors"
|
||||
"github.com/valyala/fastjson"
|
||||
|
||||
"github.com/c9s/bbgo/fixedpoint"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||
"github.com/c9s/bbgo/pkg/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/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
)
|
||||
|
||||
type BaseEvent struct {
|
|
@ -5,8 +5,8 @@ import (
|
|||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
max "github.com/c9s/bbgo/exchange/max/maxapi"
|
||||
"github.com/c9s/bbgo/types"
|
||||
max "github.com/c9s/bbgo/pkg/exchange/max/maxapi"
|
||||
"github.com/c9s/bbgo/pkg/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/accounting"
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/util"
|
||||
"github.com/c9s/bbgo/pkg/accounting"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
)
|
||||
|
||||
type SlackAttachmentCreator interface {
|
|
@ -8,7 +8,7 @@ import (
|
|||
"github.com/pkg/errors"
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"github.com/c9s/bbgo/types"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
type TradeSync struct {
|
|
@ -7,7 +7,7 @@ import (
|
|||
|
||||
"github.com/slack-go/slack"
|
||||
|
||||
"github.com/c9s/bbgo/util"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
)
|
||||
|
||||
type KLineOrWindow interface {
|
|
@ -5,8 +5,8 @@ import (
|
|||
"sort"
|
||||
"sync"
|
||||
|
||||
"github.com/c9s/bbgo/fixedpoint"
|
||||
"github.com/c9s/bbgo/sigchan"
|
||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||
"github.com/c9s/bbgo/pkg/sigchan"
|
||||
)
|
||||
|
||||
type PriceVolume struct {
|
|
@ -6,7 +6,7 @@ import (
|
|||
|
||||
"github.com/slack-go/slack"
|
||||
|
||||
"github.com/c9s/bbgo/util"
|
||||
"github.com/c9s/bbgo/pkg/util"
|
||||
)
|
||||
|
||||
type Trade struct {
|
Loading…
Reference in New Issue
Block a user