mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 16:55:15 +00:00
types: extend FuturesSettings fields for isolated margin
This commit is contained in:
parent
c8ba2e59e3
commit
3d536efec8
|
@ -8,14 +8,23 @@ type FuturesExchange interface {
|
||||||
|
|
||||||
type FuturesSettings struct {
|
type FuturesSettings struct {
|
||||||
IsFutures bool
|
IsFutures bool
|
||||||
|
IsIsolatedFutures bool
|
||||||
|
IsolatedFuturesSymbol string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s FuturesSettings) GetFuturesSettings() FuturesSettings {
|
||||||
|
return s
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *FuturesSettings) UseFutures() {
|
func (s *FuturesSettings) UseFutures() {
|
||||||
s.IsFutures = true
|
s.IsFutures = true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s FuturesSettings) GetFuturesSettings() FuturesSettings {
|
func (s *FuturesSettings) UseIsolatedFutures(symbol string) {
|
||||||
return s
|
s.IsFutures = true
|
||||||
|
s.IsIsolatedFutures = true
|
||||||
|
s.IsolatedFuturesSymbol = symbol
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user