move InventorySkew to strategy.common

This commit is contained in:
narumi 2024-05-20 15:11:18 +08:00
parent 970c1bb8c7
commit 5f096bbe0d
4 changed files with 7 additions and 8 deletions

View File

@ -1,4 +1,4 @@
package fixedmaker package common
import ( import (
"fmt" "fmt"

View File

@ -1,4 +1,4 @@
package fixedmaker package common
import ( import (
"testing" "testing"

View File

@ -35,7 +35,7 @@ type Strategy struct {
OrderType types.OrderType `json:"orderType"` OrderType types.OrderType `json:"orderType"`
DryRun bool `json:"dryRun"` DryRun bool `json:"dryRun"`
InventorySkew InventorySkew `json:"inventorySkew"` InventorySkew common.InventorySkew `json:"inventorySkew"`
activeOrderBook *bbgo.ActiveOrderBook activeOrderBook *bbgo.ActiveOrderBook
} }

View File

@ -10,7 +10,6 @@ import (
"github.com/c9s/bbgo/pkg/bbgo" "github.com/c9s/bbgo/pkg/bbgo"
"github.com/c9s/bbgo/pkg/fixedpoint" "github.com/c9s/bbgo/pkg/fixedpoint"
"github.com/c9s/bbgo/pkg/strategy/common" "github.com/c9s/bbgo/pkg/strategy/common"
"github.com/c9s/bbgo/pkg/strategy/fixedmaker"
"github.com/c9s/bbgo/pkg/types" "github.com/c9s/bbgo/pkg/types"
) )
@ -39,7 +38,7 @@ type Strategy struct {
ReferenceExchange string `json:"referenceExchange"` ReferenceExchange string `json:"referenceExchange"`
ReferencePriceEMA types.IntervalWindow `json:"referencePriceEMA"` ReferencePriceEMA types.IntervalWindow `json:"referencePriceEMA"`
OrderPriceLossThreshold fixedpoint.Value `json:"orderPriceLossThreshold"` OrderPriceLossThreshold fixedpoint.Value `json:"orderPriceLossThreshold"`
InventorySkew fixedmaker.InventorySkew `json:"inventorySkew"` InventorySkew common.InventorySkew `json:"inventorySkew"`
market types.Market market types.Market
activeOrderBook *bbgo.ActiveOrderBook activeOrderBook *bbgo.ActiveOrderBook