mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
add futures exchange interface and futures settings struct
This commit is contained in:
parent
9a6b901c85
commit
454564506f
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user