Beispiel #1
0
        private void L1OnFundamentalMsg(IQMessageArgs args)
        {
            L1FundamentalMsg msg;

            L1FundamentalMsg.Parse(args, out msg);

            InstrumentSubscription subscription;

            using (instrumentSubscriptionsLock.Lock())
            {
                if (!instrumentSubscriptionsByCode.TryGetValue(msg.Symbol, out subscription))
                {
                    return;
                }
            }

            switch (subscription.SecurityType)
            {
            case SecurityType.FUTURE:
            case SecurityType.FOPTION:
                break;

            default:
                subscription.InstrumentParams.PriceStepValue = subscription.InstrumentParams.PriceStep;
                break;
            }

            var shouldTransmit = subscription.Update(ref msg);

            if (shouldTransmit)
            {
                OnMessageReceived(subscription.InstrumentParams);
            }
        }
Beispiel #2
0
            public bool Update(ref L1FundamentalMsg msg)
            {
                Confirm();

                using (syncRoot.Lock())
                {
                    InstrumentParams.DecimalPlaces  = msg.DecimalPlaces;
                    InstrumentParams.PriceStep      = msg.PriceStep;
                    InstrumentParams.PriceStepValue = msg.PriceStepValue;

                    return(true);
                }
            }