first version
This commit is contained in:
+12
-3
@@ -10,12 +10,21 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
configPath := flag.String("config", "config.yaml", "path to YAML configuration file")
|
||||
mode := flag.String("mode", "", "override APP_MODE: backtest|paper|sandbox|live_readonly|live_trade")
|
||||
unhalt := flag.Bool("unhalt", false, "manually clear HALT after reconciliation")
|
||||
reason := flag.String("reason", "", "audit reason for -unhalt")
|
||||
health := flag.Bool("healthcheck", false, "check local /health endpoint")
|
||||
healthURL := flag.String("healthcheck-url", "", "healthcheck URL; default http://127.0.0.1:3300/health")
|
||||
flag.Parse()
|
||||
|
||||
if err := app.Run(context.Background(), app.Options{
|
||||
ConfigPath: *configPath,
|
||||
Stdout: os.Stdout,
|
||||
Stdout: os.Stdout,
|
||||
Stderr: os.Stderr,
|
||||
ModeOverride: *mode,
|
||||
Unhalt: *unhalt,
|
||||
Reason: *reason,
|
||||
Healthcheck: *health,
|
||||
HealthcheckURL: *healthURL,
|
||||
}); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "bot failed: %v\n", err)
|
||||
os.Exit(1)
|
||||
|
||||
Reference in New Issue
Block a user