add futures exchange interface and futures settings struct

This commit is contained in:
c9s 2021-10-07 21:29:14 +08:00
parent 9a6b901c85
commit 454564506f

View File

@ -2,6 +2,23 @@ package types
import "github.com/c9s/bbgo/pkg/fixedpoint"
type FuturesExchange interface {
UseFutures()
}
type FuturesSettings struct {
IsFutures bool
}
func (s *FuturesSettings) UseFutures() {
s.IsFutures = true
}
func (s FuturesSettings) GetFuturesSettings() FuturesSettings {
return s
}
type MarginExchange interface {
UseMargin()
UseIsolatedMargin(symbol string)