Пример #1
0
        private int GetBaseRequestId(Security security)
        {
            if (ActiveQuotes.Exists(x => x.Security == security))
            {
                return(ActiveQuotes.Find(x => x.Security == security).BaseReqId);
            }

            if (SnapShotQuotes.Exists(x => x.Security == security))
            {
                return(SnapShotQuotes.Find(x => x.Security == security).BaseReqId);
            }

            return(-1);
        }
Пример #2
0
        protected Security GetRequestSecurity(int reqId)
        {
            var baseId = (reqId - (reqId % 10));

            if (ActiveQuotes.Exists(x => x.BaseReqId == baseId))
            {
                return(ActiveQuotes.Find(x => x.BaseReqId == baseId).Security);
            }

            if (SnapShotQuotes.Exists(x => x.BaseReqId == baseId))
            {
                return(SnapShotQuotes.Find(x => x.BaseReqId == baseId).Security);
            }

            return(null);
        }