public async Task valid_symbol_dividend_with_to_date_returns_result_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var divs = await client.GetDividendsAsync(Consts.TestSymbol, null, Consts.EndDate);

            Assert.IsTrue(divs.Count > 0);
        }
        public async Task valid_symbol_split_with_from_and_to_date_returns_result_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var splits = await client.GetShareSplitsAsync(Consts.TestSymbol, Consts.StartDate, Consts.EndDate);

            Assert.IsTrue(splits.Count > 0);
        }
コード例 #3
0
        public async Task historical_intraday_valid_symbol_returns_prices_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var prices = await client.GetHistoricalIntradayPricesAsync(Consts.TestSymbol, "1h", DateTime.UtcNow.Subtract(TimeSpan.FromDays(10)), DateTime.UtcNow);

            Assert.IsTrue(prices.Count > 0);
        }
        public async Task fundamental_stock_returns_data_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var fundamental = await client.GetFundamentalStockAsync(Consts.TestSymbol);

            Assert.IsNotNull(fundamental);
        }
        public async Task index_composition_returns_data_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var index = await client.GetIndexCompositionAsync(Consts.TestIndex);

            Assert.IsNotNull(index);
        }
コード例 #6
0
        public async Task historical_valid_symbols_null_data_returns_prices_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var prices = await client.GetHistoricalPricesAsync(Consts.TestSymbolNullData, null, null);

            Assert.IsTrue(prices.Count > 0);
        }
コード例 #7
0
        public async Task search_by_company_name_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var instruments = await client.SearchAsync(Consts.TestCompanyName);

            Assert.IsTrue(instruments.Count > 0);
        }
コード例 #8
0
        public async Task realtime_valid_symbol_return_result_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var price = await client.GetRealTimePriceAsync(Consts.TestSymbol);

            Assert.IsNotNull(price);
        }
コード例 #9
0
        public async Task search_by_isin_number_test_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var instruments = await client.SearchAsync(Consts.ValidIsinNumber);

            Assert.IsTrue(instruments.Count > 0);
        }
        public async Task exchange_instruments_returns_data_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var instruments = await client.GetExchangeInstrumentsAsync(Consts.Exchange);

            Assert.IsNotNull(instruments);
            Assert.IsNotNull(instruments.Count > 1000);
        }
コード例 #11
0
        public async Task valid_symbol_split_with_from_and_to_date_and_both_tradedate_returns_result_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var options = await client.GetOptionsAsync(Consts.TestSymbol, Consts.OptionsStartDate, Consts.OptionsEndDate, Consts.OptionsTradeStartDate, Consts.OptionsTradeEndDate);

            Assert.IsNotNull(options);
            Assert.IsTrue(options.Data.Count > 0);
        }
コード例 #12
0
        public async Task options_valid_symbols_returns_prices_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var options = await client.GetOptionsAsync(Consts.TestSymbol, null, null);

            Assert.IsNotNull(options);
            Assert.IsTrue(options.Data.Count > 0);
        }
        public async Task bulk_fundamental_stocks_returns_data_lower_case_exchange()
        {
            var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var bulkFundamentalStocks = await client.GetBulkFundamentalStocksAsync(Consts.LargeExchange.ToLower(), 0, 5);

            Assert.IsNotNull(bulkFundamentalStocks);
            Assert.AreEqual(5, bulkFundamentalStocks.Count());
        }
        public async Task bulk_fundamental_stocks_large_returns_data_no_greater_than_1000()
        {
            var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var bulkFundamentalStocks = await client.GetBulkFundamentalStocksAsync(Consts.LargeExchange, 0, 5000);

            Assert.IsNotNull(bulkFundamentalStocks);
            Assert.AreEqual(1000, bulkFundamentalStocks.Count());
        }
コード例 #15
0
 public async Task historical_valid_symbols_throws_not_found_async()
 {
     await Assert.ThrowsExceptionAsync <System.Net.Http.HttpRequestException>(async() =>
     {
         using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
         var prices       = await client.GetHistoricalPricesAsync(Consts.TestSymbolReturnsEmpty, null, null);
     });
 }
コード例 #16
0
        public async Task realtime_multiple_valid_symbols_return_result_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var prices = await client.GetRealTimePricesAsync(Consts.MultipleTestSymbol);

            Assert.IsNotNull(prices);
            Assert.IsTrue(prices.Count == Consts.MultipleTestSymbol.Length);
        }
        public async Task exchange_list_returns_data_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var exchanges = await client.GetExchangeListAsync();

            Assert.IsNotNull(exchanges);
            Assert.IsNotNull(exchanges.Count > 50);
        }
        public async Task exchange_details_returns_data_no_date_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var exchangeDetails = await client.GetExchangeDetailsAsync("US", null, null);

            Assert.IsNotNull(exchangeDetails);
            Assert.IsTrue(exchangeDetails.ExchangeHolidays.Count > 0);
        }
コード例 #19
0
        public async Task ipos_no_parameters_returns_prices_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var ipos = await client.GetIposAsync();

            Assert.IsNotNull(ipos);
            Assert.IsTrue(ipos.IposData.Count > 0);
        }
コード例 #20
0
        public async Task ipos_with_from_and_to_date_returns_result_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var ipos = await client.GetIposAsync(Consts.OptionsStartDate, Consts.OptionsEndDate);

            Assert.IsNotNull(ipos);
            Assert.IsTrue(ipos.IposData.Count > 0);
        }
コード例 #21
0
        public async Task splits_with_symbols_list_returns_result_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var splits = await client.GetIncomingSplitsAsync(null, null, Consts.MultipleSymbolEarnings);

            Assert.IsNotNull(splits);
            Assert.IsTrue(splits.Splits.Count > 0);
        }
コード例 #22
0
        public async Task earnings_with_to_date_returns_result_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var earnings = await client.GetEarningsAsync(null, Consts.OptionsFuture3MonthEndDate);

            Assert.IsNotNull(earnings);
            Assert.IsTrue(earnings.EarningsData.Count > 0);
        }
コード例 #23
0
        public async Task splits_with_from_and_to_date_returns_result_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var splits = await client.GetIncomingSplitsAsync(Consts.OptionsStartDate, Consts.OptionsEndDate);

            Assert.IsNotNull(splits);
            Assert.IsTrue(splits.Splits.Count > 0);
        }
コード例 #24
0
        public async Task splits_no_parameters_returns_prices_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var splits = await client.GetIncomingSplitsAsync();

            Assert.IsNotNull(splits);
            Assert.IsTrue(splits.Splits.Count > 0);
        }
コード例 #25
0
        public async Task earnings_no_parameters_returns_prices_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var earnings = await client.GetEarningsAsync();

            Assert.IsNotNull(earnings);
            Assert.IsTrue(earnings.EarningsData.Count > 0);
        }
コード例 #26
0
        public async Task ipos_with_symbols_list_returns_result_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var ipos = await client.GetIposAsync(null, null, Consts.MultipleSymbolEarnings);

            Assert.IsNotNull(ipos);
            Assert.IsTrue(ipos.IposData.Count > 0);
        }
        public async Task exchange_bulk_splits_returns_data_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);

            var exchangeBulkSplits = await client.GetExchangeBulkSplitsAsync("US", null);

            Assert.IsNotNull(exchangeBulkSplits);
            Assert.IsTrue(exchangeBulkSplits.Count > 0);
        }
        public async Task exchange_bulk_dividends_returns_symbols_data_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);

            var exchangeBulkDividends = await client.GetExchangeBulkPricesAsync("US", null, "MSFT");

            Assert.IsNotNull(exchangeBulkDividends);
            Assert.IsTrue(exchangeBulkDividends.Count > 0);
        }
コード例 #29
0
        public async Task historical_valid_symbols_with_to_date_returns_prices_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var prices = await client.GetHistoricalPricesAsync(Consts.TestSymbol, null, Consts.EndDate);

            var maxDate = prices.Max(x => x.Date).Date;

            Assert.IsTrue(maxDate == Consts.EndDate);
        }
        public async Task exchange_bulk_dividends_returns_data_for_date_async()
        {
            using var client = new EODHistoricalDataAsyncClient(Consts.ApiToken, true);
            var queryDate = new DateTime(2022, 2, 16);

            var exchangeBulkDividends = await client.GetExchangeBulkPricesAsync("US", queryDate);

            Assert.IsNotNull(exchangeBulkDividends);
            Assert.IsTrue(exchangeBulkDividends.Count > 0);
        }