adding project logic
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user