public void index_composition_returns_data()
        {
            EODHistoricalDataClient client = new EODHistoricalDataClient(Consts.ApiToken, true);
            IndexComposition        index  = client.GetIndexComposition(Consts.TestIndex);

            Assert.IsNotNull(index);
        }
        public void fundamental_fund_returns_data()
        {
            EODHistoricalDataClient client      = new EODHistoricalDataClient(Consts.ApiToken, true);
            FundamentalFund         fundamental = client.GetFundamentalFund(Consts.TestFund);

            Assert.IsNotNull(fundamental);
        }
Example #3
0
        public void historical_valid_symbols_null_data_returns_prices()
        {
            using var client = new EODHistoricalDataClient(Consts.ApiToken, true);
            var prices = client.GetHistoricalPrices(Consts.TestSymbolNullData, null, null);

            Assert.IsTrue(prices.Count > 0);
        }
        public void fundamental_etf_returns_data()
        {
            using var client = new EODHistoricalDataClient(Consts.ApiToken, true);
            var fundamental = client.GetFundamentalETF(Consts.TestETF);

            Assert.IsNotNull(fundamental);
        }
        public void fundamental_stock_returns_data()
        {
            EODHistoricalDataClient client      = new EODHistoricalDataClient(Consts.ApiToken, true);
            FundamentalStock        fundamental = client.GetFundamentalStock(Consts.TestSymbol);

            Assert.IsNotNull(fundamental);
        }
Example #6
0
        public void valid_symbol_dividend_with_from_and_to_date_returns_result()
        {
            EODHistoricalDataClient client = new EODHistoricalDataClient(Consts.ApiToken, true);
            List <Dividend>         divs   = client.GetDividends(Consts.TestSymbol, Consts.StartDate, Consts.EndDate);

            Assert.IsTrue(divs.Count > 0);
        }
Example #7
0
        public void valid_symbol_split_with_to_date_returns_result()
        {
            using var client = new EODHistoricalDataClient(Consts.ApiToken, true);
            var splits = client.GetShareSplits(Consts.TestSymbol, null, Consts.EndDate);

            Assert.IsTrue(splits.Count > 0);
        }
Example #8
0
        public void valid_symbol_split_with_from_and_to_date_returns_result()
        {
            EODHistoricalDataClient client = new EODHistoricalDataClient(Consts.ApiToken, true);
            List <ShareSplit>       splits = client.GetShareSplits(Consts.TestSymbol, Consts.StartDate, Consts.EndDate);

            Assert.IsTrue(splits.Count > 0);
        }
        public void historical_valid_symbols_returns_empty()
        {
            EODHistoricalDataClient client = new EODHistoricalDataClient(Consts.ApiToken, true);
            List <HistoricalPrice>  prices = client.GetHistoricalPrices(Consts.TestSymbolReturnsEmpty, null, null);

            Assert.IsTrue(prices.Count == 0);
        }
Example #10
0
        public void realtime_valid_symbol_return_result()
        {
            using var client = new EODHistoricalDataClient(Consts.ApiToken, true);
            var price = client.GetRealTimePrice(Consts.TestSymbol);

            Assert.IsNotNull(price);
        }
Example #11
0
        public void valid_symbol_dividend_with_to_date_returns_result()
        {
            using var client = new EODHistoricalDataClient(Consts.ApiToken, true);
            var divs = client.GetDividends(Consts.TestSymbol, null, Consts.EndDate);

            Assert.IsTrue(divs.Count > 0);
        }
        public void ipos_with_symbols_list_returns_result()
        {
            EODHistoricalDataClient client = new EODHistoricalDataClient(Consts.ApiToken, true);
            Ipos ipos = client.GetIpos(null, null, Consts.MultipleSymbolEarnings);

            Assert.IsNotNull(ipos);
            Assert.IsTrue(ipos.IposData.Count > 0);
        }
Example #13
0
        public void bulk_fundamental_stocks_returns_data()
        {
            var client = new EODHistoricalDataClient(Consts.ApiToken, true);
            var bulkFundamentalStocks = client.GetBulkFundamentalStocks(Consts.Exchange, 0, 5);

            Assert.IsNotNull(bulkFundamentalStocks);
            Assert.AreEqual(5, bulkFundamentalStocks.Count());
        }
Example #14
0
        public void bulk_fundamental_stocks_large_returns_data_no_greater_than_1000()
        {
            var client = new EODHistoricalDataClient(Consts.ApiToken, true);
            var bulkFundamentalStocks = client.GetBulkFundamentalStocks(Consts.LargeExchange, 0, 5000);

            Assert.IsNotNull(bulkFundamentalStocks);
            Assert.AreEqual(1000, bulkFundamentalStocks.Count());
        }
Example #15
0
        public void options_valid_symbols_returns_prices()
        {
            using var client = new EODHistoricalDataClient(Consts.ApiToken, true);
            var options = client.GetOptions(Consts.TestSymbol, null, null);

            Assert.IsNotNull(options);
            Assert.IsTrue(options.Data.Count > 0);
        }
        public void splits_with_from_and_to_date_returns_result()
        {
            EODHistoricalDataClient client = new EODHistoricalDataClient(Consts.ApiToken, true);
            IncomingSplits          splits = client.GetIncomingSplits(Consts.OptionsStartDate, Consts.OptionsEndDate);

            Assert.IsNotNull(splits);
            Assert.IsTrue(splits.Splits.Count > 0);
        }
Example #17
0
        public void historical_valid_symbols_with_to_date_returns_prices()
        {
            using var client = new EODHistoricalDataClient(Consts.ApiToken, true);
            var prices  = client.GetHistoricalPrices(Consts.TestSymbol, null, Consts.EndDate);
            var maxDate = prices.Max(x => x.Date).Date;

            Assert.IsTrue(maxDate == Consts.EndDate);
        }
Example #18
0
        public void historical_valid_symbols_with_from_date_returns_prices()
        {
            using var client = new EODHistoricalDataClient(Consts.ApiToken, true);
            var prices  = client.GetHistoricalPrices(Consts.TestSymbol, Consts.StartDate, null);
            var minDate = prices.Min(x => x.Date).Date;

            Assert.IsTrue(minDate == Consts.StartDate);
        }
Example #19
0
        public void realtime_multiple_valid_symbols_return_result()
        {
            using var client = new EODHistoricalDataClient(Consts.ApiToken, true);
            var prices = client.GetRealTimePrices(Consts.MultipleTestSymbol);

            Assert.IsNotNull(prices);
            Assert.IsTrue(prices.Count == Consts.MultipleTestSymbol.Length);
        }
        public void exchange_list_returns_data()
        {
            using var client = new EODHistoricalDataClient(Consts.ApiToken, true);
            var exchanges = client.GetExchangeList();

            Assert.IsNotNull(exchanges);
            Assert.IsNotNull(exchanges.Count > 50);
        }
        public void splits_no_parameters_returns_prices()
        {
            EODHistoricalDataClient client = new EODHistoricalDataClient(Consts.ApiToken, true);
            IncomingSplits          splits = client.GetIncomingSplits();

            Assert.IsNotNull(splits);
            Assert.IsTrue(splits.Splits.Count > 0);
        }
        public void earnings_with_from_and_to_date_returns_result()
        {
            EODHistoricalDataClient client = new EODHistoricalDataClient(Consts.ApiToken, true);
            Earnings earnings = client.GetEarnings(Consts.OptionsStartDate, Consts.OptionsEndDate);

            Assert.IsNotNull(earnings);
            Assert.IsTrue(earnings.EarningsData.Count > 0);
        }
        public void earnings_no_parameters_returns_prices()
        {
            EODHistoricalDataClient client = new EODHistoricalDataClient(Consts.ApiToken, true);
            Earnings earnings = client.GetEarnings();

            Assert.IsNotNull(earnings);
            Assert.IsTrue(earnings.EarningsData.Count > 0);
        }
        public void ipos_no_parameters_returns_prices()
        {
            EODHistoricalDataClient client = new EODHistoricalDataClient(Consts.ApiToken, true);
            Ipos ipos = client.GetIpos();

            Assert.IsNotNull(ipos);
            Assert.IsTrue(ipos.IposData.Count > 0);
        }
        public void splits_with_symbols_list_returns_result()
        {
            EODHistoricalDataClient client = new EODHistoricalDataClient(Consts.ApiToken, true);
            IncomingSplits          splits = client.GetIncomingSplits(null, null, Consts.MultipleSymbolEarnings);

            Assert.IsNotNull(splits);
            Assert.IsTrue(splits.Splits.Count > 0);
        }
Example #26
0
        public void valid_symbol_split_with_from_and_to_date_and_both_tradedate_returns_result()
        {
            using var client = new EODHistoricalDataClient(Consts.ApiToken, true);
            var options = client.GetOptions(Consts.TestSymbol, Consts.OptionsStartDate, Consts.OptionsEndDate, Consts.OptionsTradeStartDate, Consts.OptionsTradeEndDate);

            Assert.IsNotNull(options);
            Assert.IsTrue(options.Data.Count > 0);
        }
        public void earnings_with_symbols_list_returns_result()
        {
            EODHistoricalDataClient client = new EODHistoricalDataClient(Consts.ApiToken, true);
            Earnings earnings = client.GetEarnings(null, null, Consts.MultipleSymbolEarnings);

            Assert.IsNotNull(earnings);
            Assert.IsTrue(earnings.EarningsData.Count > 0);
        }
Example #28
0
 public void historical_valid_symbols_throws_not_found()
 {
     Assert.ThrowsException <System.Net.Http.HttpRequestException>(() =>
     {
         using var client = new EODHistoricalDataClient(Consts.ApiToken, true);
         var prices       = client.GetHistoricalPrices(Consts.TestSymbolReturnsEmpty, null, null);
     });
 }
        public void ipos_with_from_and_to_date_returns_result()
        {
            EODHistoricalDataClient client = new EODHistoricalDataClient(Consts.ApiToken, true);
            Ipos ipos = client.GetIpos(Consts.OptionsStartDate, Consts.OptionsEndDate);

            Assert.IsNotNull(ipos);
            Assert.IsTrue(ipos.IposData.Count > 0);
        }
        public void exchange_instruments_returns_data()
        {
            EODHistoricalDataClient client      = new EODHistoricalDataClient(Consts.ApiToken, true);
            List <Instrument>       instruments = client.GetExchangeInstruments(Consts.Exchange);

            Assert.IsNotNull(instruments);
            Assert.IsNotNull(instruments.Count > 1000);
        }