sixth version
This commit is contained in:
@@ -177,6 +177,9 @@ func (c *Config) Validate() error {
|
||||
if c.App.ShutdownTimeoutSec <= 0 {
|
||||
return errors.New("APP_SHUTDOWN_TIMEOUT_SEC must be positive")
|
||||
}
|
||||
if c.TInvest.RequestTimeoutSec <= 0 {
|
||||
return errors.New("TINVEST_REQUEST_TIMEOUT_SEC must be positive")
|
||||
}
|
||||
if c.Execution.AllowMarketOrders {
|
||||
return errors.New("EXEC_ALLOW_MARKET_ORDERS must remain false: strategy is LIMIT-only")
|
||||
}
|
||||
|
||||
@@ -35,8 +35,9 @@ func minimalBrokerConfig(mode domain.Mode) Config {
|
||||
ShutdownTimeoutSec: 30,
|
||||
},
|
||||
TInvest: TInvestConfig{
|
||||
Token: "token",
|
||||
AccountID: "account",
|
||||
Token: "token",
|
||||
AccountID: "account",
|
||||
RequestTimeoutSec: 10,
|
||||
},
|
||||
DB: DBConfig{DSN: "user:pass@tcp(localhost:3306)/bot"},
|
||||
Execution: ExecutionConfig{
|
||||
|
||||
Reference in New Issue
Block a user