diff --git a/config/deposit2transfer.yaml b/config/deposit2transfer.yaml new file mode 100644 index 000000000..2f4cef67d --- /dev/null +++ b/config/deposit2transfer.yaml @@ -0,0 +1,12 @@ +--- +## deposit2transfer scans the deposit history and then transfer the deposited assets into your margin account +## currently only cross-margin is supported. +exchangeStrategies: +- on: binance + deposit2transfer: + ## interval is the deposit history scanning interval + interval: 1m + + ## assets are the assets you want to transfer into the margin account + assets: + - BTC diff --git a/pkg/strategy/deposit2transfer/strategy.go b/pkg/strategy/deposit2transfer/strategy.go index 19aff8a17..dd47ab5f6 100644 --- a/pkg/strategy/deposit2transfer/strategy.go +++ b/pkg/strategy/deposit2transfer/strategy.go @@ -11,7 +11,6 @@ import ( "github.com/sirupsen/logrus" "github.com/c9s/bbgo/pkg/bbgo" - "github.com/c9s/bbgo/pkg/exchange/binance" "github.com/c9s/bbgo/pkg/fixedpoint" "github.com/c9s/bbgo/pkg/types" ) @@ -24,8 +23,6 @@ const ID = "deposit2transfer" var log = logrus.WithField("strategy", ID) -var errNotBinanceExchange = errors.New("not binance exchange, currently only support binance exchange") - var errMarginTransferNotSupport = errors.New("exchange session does not support margin transfer") var errDepositHistoryNotSupport = errors.New("exchange session does not support deposit history query") @@ -44,8 +41,6 @@ type Strategy struct { Interval types.Interval `json:"interval"` - binanceSpot *binance.Exchange - marginTransferService marginTransferService depositHistoryService types.ExchangeTransferService