diff --git a/pkg/strategy/autobuy/strategy.go b/pkg/strategy/autobuy/strategy.go index 06dadb86c..85ef0b316 100644 --- a/pkg/strategy/autobuy/strategy.go +++ b/pkg/strategy/autobuy/strategy.go @@ -65,6 +65,18 @@ func (s *Strategy) InstanceID() string { } func (s *Strategy) Validate() error { + if s.Symbol == "" { + return fmt.Errorf("symbol is required") + } + + if s.Schedule == "" { + return fmt.Errorf("schedule is required") + } + + if s.MinBaseBalance.Sign() <= 0 { + return fmt.Errorf("minBaseBalance must be greater than 0") + } + if err := s.QuantityOrAmount.Validate(); err != nil { return err }