|
|
|
|
@ -29,6 +29,7 @@ import Control.Exception (bracket)
@@ -29,6 +29,7 @@ import Control.Exception (bracket)
|
|
|
|
|
import Control.Monad (forever, void) |
|
|
|
|
import Control.Monad.IO.Class (MonadIO) |
|
|
|
|
import qualified Data.Text as T |
|
|
|
|
import Data.Time.Clock.POSIX (getPOSIXTime) |
|
|
|
|
import Data.Version (showVersion) |
|
|
|
|
import Debug.EventCounters (emitEvent, |
|
|
|
|
initEventCounters) |
|
|
|
|
@ -108,12 +109,13 @@ main = do
@@ -108,12 +109,13 @@ main = do
|
|
|
|
|
tickTable <- newTickTable |
|
|
|
|
paper <- mkPaperBroker tickTable tisH qssCh2 (fromDouble 100000.0) ["demo"] (commissions cfg) logger |
|
|
|
|
txml <- Connector.start logger tickTable cfg qssChannel tisH |
|
|
|
|
startTimestamp <- floor <$> getPOSIXTime |
|
|
|
|
bracket (startBrokerServer |
|
|
|
|
[Connector.makeBrokerBackend txml (account cfg), paper] |
|
|
|
|
ctx |
|
|
|
|
(brokerEndpoint cfg) |
|
|
|
|
(brokerNotificationsEndpoint cfg) |
|
|
|
|
(NotificationSqnum 1) |
|
|
|
|
(NotificationSqnum startTimestamp) |
|
|
|
|
[tsDashboard, tsGotify] |
|
|
|
|
defaultServerSecurityParams |
|
|
|
|
logger) (\x -> do |
|
|
|
|
|