public void GetQuoteAndCompanyInformationInBatchQuery()
        {
            var iex        = new IEXClient();
            var types      = new[] { "company", "quote" };
            var resultList = iex.GetBatchData(symbols, types);

            resultList.ShouldNotBeNull();
            resultList.Count.ShouldBe(symbols.Length);

            var aapl = resultList.FirstOrDefault();

            aapl.ShouldNotBeNull();
            aapl.company.ShouldNotBeNull();
            aapl.company.companyName.ShouldNotBeNull();
            aapl.company.symbol.ShouldNotBeNull();

            string symbol = aapl.company.symbol;

            symbol.ShouldBe("AAPL");

            aapl.quote.ShouldNotBeNull();
            aapl.quote.Close.ShouldNotBeNull();
            double close = aapl.quote.Close ?? 0;

            close.ShouldBeGreaterThan(0);
        }
        public void GetNewsForInBatchQuery()
        {
            var iex        = new IEXClient();
            var types      = new[] { "stats", "quote" };
            var resultList = iex.GetBatchData(symbols, types);

            resultList.ShouldNotBeNull();
            resultList.Count.ShouldBe(symbols.Length);

            var aapl = resultList.FirstOrDefault();

            aapl.quote.ShouldNotBeNull();
            aapl.stats.ShouldNotBeNull();

            var exDivDate = aapl.stats.ExDividendDate;

            exDivDate.ShouldNotBeNullOrEmpty();
        }
        public void BatchCompanyCall()
        {
            var symbols = new string[] { "MSFT", "AAPL" };
            var types   = new[] { "company" };

            var iex    = new IEXClient();
            var result = iex.GetBatchData(symbols, types);

            Assert.NotNull(result);
            result.Count.ShouldBe(2);

            var msft = result.Where(i => i.company.symbol == "MSFT").FirstOrDefault();

            Assert.NotNull(msft);
            msft.company.symbol.ShouldBe("MSFT");

            var aapl = result.Where(i => i.company.symbol == "AAPL").FirstOrDefault();

            Assert.NotNull(aapl);
            aapl.company.symbol.ShouldBe("AAPL");
        }