types: extend FuturesSettings fields for isolated margin

This commit is contained in:
c9s 2021-12-05 15:30:58 +08:00
parent c8ba2e59e3
commit 3d536efec8

View File

@ -8,14 +8,23 @@ type FuturesExchange interface {
type FuturesSettings struct {
IsFutures bool
IsIsolatedFutures bool
IsolatedFuturesSymbol string
}
func (s FuturesSettings) GetFuturesSettings() FuturesSettings {
return s
}
func (s *FuturesSettings) UseFutures() {
s.IsFutures = true
}
func (s FuturesSettings) GetFuturesSettings() FuturesSettings {
return s
func (s *FuturesSettings) UseIsolatedFutures(symbol string) {
s.IsFutures = true
s.IsIsolatedFutures = true
s.IsolatedFuturesSymbol = symbol
}