Exemplo n.º 1
0
        private bool QueryYahooFinanceProfile(ref StockProfile aStock)
        {
            String nYahooQueryStr = YahooFinanceParser.PROFILE_STR;

            nYahooQueryStr = nYahooQueryStr.Replace("@TICK", getYahooSymbol(aStock, aStock.Sym));

            String             nYahooHtmlStr = RESTController.GetREST(nYahooQueryStr);
            YahooFinanceParser nYahooParser  = new YahooFinanceParser(aStock);

            if (nYahooParser.StartHTML(nYahooHtmlStr))
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 2
0
        private bool QueryMorningStar(ref StockProfile aStock)
        {
            String nMorningQueryStr = MorningStarParser.QUERY_STR;

            nMorningQueryStr = nMorningQueryStr.Replace("@TICK", getMorningStarSymbol(aStock, aStock.Sym));

            String            nMorningOutStr = RESTController.GetREST(nMorningQueryStr);
            MorningStarParser nMorningParser = new MorningStarParser(aStock);

            if (nMorningParser.StartCSV(nMorningOutStr))
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 3
0
        private bool QueryReuters(ref StockProfile aStock)
        {
            String nReutersQueryStr = ReutersParser.QUERY_STR;

            nReutersQueryStr = nReutersQueryStr.Replace("@TICK", aStock.Sym);

            String        nReutersHtmlStr = RESTController.GetREST(nReutersQueryStr);
            ReutersParser nReutersParser  = new ReutersParser(aStock);

            if (nReutersParser.StartHTML(nReutersHtmlStr))
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 4
0
        private bool QueryYahooDataFull(ref StockData aStockData)
        {
            String nYahooDownloadStr = YahooFinanceDownloader.QUERY_FULL_STR;

            nYahooDownloadStr = nYahooDownloadStr.Replace("@ED", (DateTime.Now.Day).ToString());
            nYahooDownloadStr = nYahooDownloadStr.Replace("@EM", (DateTime.Now.Month - 1).ToString());
            nYahooDownloadStr = nYahooDownloadStr.Replace("@EY", DateTime.Now.Year.ToString());
            nYahooDownloadStr = nYahooDownloadStr.Replace("@TICK", getYahooSymbol(aStockData, aStockData.Sym));

            String nYahooOutStr = RESTController.GetREST(nYahooDownloadStr);
            YahooFinanceDownloader nDownloader = new YahooFinanceDownloader(aStockData);

            if (nDownloader.StartCSV(nYahooOutStr))
            {
                return(true);
            }

            return(false);
        }