add MarginBorrowRepay interface

This commit is contained in:
c9s 2022-04-22 14:08:29 +08:00
parent 37b5d80f6f
commit 9f9f13dfe2

View File

@ -1,6 +1,10 @@
package types
import "github.com/c9s/bbgo/pkg/fixedpoint"
import (
"context"
"github.com/c9s/bbgo/pkg/fixedpoint"
)
type FuturesExchange interface {
UseFutures()
@ -48,6 +52,11 @@ type MarginExchange interface {
// QueryMarginAccount(ctx context.Context) (*binance.MarginAccount, error)
}
type MarginBorrowRepay interface {
RepayMarginAsset(ctx context.Context, asset string, amount fixedpoint.Value) error
BorrowMarginAsset(ctx context.Context, asset string, amount fixedpoint.Value) error
}
type MarginSettings struct {
IsMargin bool
IsIsolatedMargin bool