mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +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 {
|
||||
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
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user