예제 #1
0
        private void ProcessExecution(Message message)
        {
            if (message.Type != MessageTypes.Execution)
            {
                return;
            }

            var execMsg = (ExecutionMessage)message;

            var latency = LatencyManager.ProcessMessage(execMsg);

            if (latency != null)
            {
                execMsg.Latency = latency;
            }

            if (execMsg.Commission == null)
            {
                execMsg.Commission = CommissionManager.ProcessExecution(execMsg);
            }
        }
예제 #2
0
        void IMessageChannel.SendInMessage(Message message)
        {
            if (message.LocalTime.IsDefault())
            {
                message.LocalTime = _innerAdapter.CurrentTime.LocalDateTime;
            }

            if (message.Type == MessageTypes.Connect)
            {
                LatencyManager.Reset();
                CommissionManager.Reset();
                RiskManager.Reset();
            }
            else
            {
                LatencyManager.ProcessMessage(message);
                ProcessRisk(message);
            }

            _innerAdapter.SendInMessage(message);
        }