adding project logic

This commit is contained in:
Ramiro Paz
2026-03-09 16:26:58 -03:00
parent f4ef52e154
commit 557c04436d
11 changed files with 461 additions and 15 deletions

View File

@ -8,6 +8,7 @@ import (
"quantex.com/qfixdpl/src/app"
"quantex.com/qfixdpl/src/client/api/rest"
"quantex.com/qfixdpl/src/client/data"
"quantex.com/qfixdpl/src/client/fix"
googlechat "quantex.com/qfixdpl/src/client/notify/google"
"quantex.com/qfixdpl/src/client/store"
"quantex.com/qfixdpl/src/client/store/external"
@ -37,6 +38,13 @@ func Runner(cfg app.Config) error {
}
userData := data.New()
orderStore := data.NewOrderStore()
fixManager := fix.NewManager(cfg.FIX, orderStore, notify)
if err = fixManager.Start(); err != nil {
return fmt.Errorf("error starting FIX acceptor: %w", err)
}
defer fixManager.Stop()
apiConfig := rest.Config{
Port: cfg.APIBasePort,
@ -46,7 +54,7 @@ func Runner(cfg app.Config) error {
EnableJWTAuth: cfg.EnableJWTAuth,
}
api := rest.New(userData, appStore, apiConfig, notify)
api := rest.New(userData, appStore, orderStore, fixManager, apiConfig, notify)
api.Run()
cmd.WaitForInterruptSignal(nil)