Example #1
0
        /// <summary>
        ///     Конструктор
        /// </summary>
        internal IQFeedGateway(IQFeedParameters parameters)
        {
            var ip = IQFeedParser.ParseIpAddressOrDns(parameters.IQConnectAddress, AddressFamily.InterNetwork);

            socketL1 = new Level1SocketWrapper(ip);

            socketL1.OnFundamentalMsg += L1OnFundamentalMsg;
            socketL1.OnSummaryMsg     += L1OnUpdateMsg;
            socketL1.OnUpdateMsg      += L1OnUpdateMsg;
            socketL1.OnSystemMsg      += L1OnSystemMsg;
            //socketL1.OnTimestampMsg += socketLevelOne_OnTimestampMsg;
            //socketL1.OnRegionalMsg += LevelOne_OnRegionalMsg;
            //socketL1.OnNewsMsg += LevelOne_OnNewsMsg;
            socketL1.OnErrorMsg += L1OnErrorMsg;
            //socketL1.OnOtherMsg += LevelOne_OnOtherMsg;
            socketL1.OnSubscriptionErrorMsg += L1OnSubscriptionErrorMsg;

            historySocket = new HistorySocketWrapper(ip);
            historySocket.OnHistoryMsg    += HistoryOnHistoryMsg;
            historySocket.OnHistoryEndMsg += HistoryOnHistoryEndMsg;
            historySocket.OnErrorMsg      += HistoryOnErrorMsg;

            lookupSocket = new LookupSocketWrapper(ip);
            lookupSocket.OnSecurityTypeMsg += LookupOnSecurityTypeMsg;
            lookupSocket.OnResultMsg       += LookupOnResultMsg;
            lookupSocket.OnErrorMsg        += LookupOnErrorMsg;

            instrumentConverter = parameters.InstrumentConverter;
        }