add deposit2transfer config

This commit is contained in:
c9s 2023-08-08 12:14:14 +08:00
parent 423cb27288
commit 29727c12be
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54
2 changed files with 12 additions and 5 deletions

View File

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

View File

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