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 package types
import "github.com/c9s/bbgo/pkg/fixedpoint" import (
"context"
"github.com/c9s/bbgo/pkg/fixedpoint"
)
type FuturesExchange interface { type FuturesExchange interface {
UseFutures() UseFutures()
@ -48,6 +52,11 @@ type MarginExchange interface {
// QueryMarginAccount(ctx context.Context) (*binance.MarginAccount, error) // 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 { type MarginSettings struct {
IsMargin bool IsMargin bool
IsIsolatedMargin bool IsIsolatedMargin bool