public async Task AdvancedFundamentalsAsyncTest(string symbol, TimeSeriesPeriod period = TimeSeriesPeriod.Quarterly, int range = 1, DateTime?from = null, DateTime?to = null)
        {
            var timeSeries = new TimeSeries(period).SetRange(range).SetDateRange(from, to);
            var response   = await sandBoxClient.StockFundamentals.AdvancedFundamentalsAsync(symbol, period, timeSeries);

            Assert.IsNull(response.ErrorMessage);
            foreach (var data in response.Data)
            {
                Assert.IsNotNull(data);
                Assert.IsNotNull(data.accountsPayable);
            }
        }
        public async Task <IEXResponse <IEnumerable <AdvancedFundamentalsResponse> > > AdvancedFundamentalsAsync(string symbol, TimeSeriesPeriod period = TimeSeriesPeriod.Quarterly, TimeSeries timeSeries = null)
        {
            const string urlPattern = "time-series/fundamentals/[symbol]/[period]";

            var qsb = new QueryStringBuilder();

            if (timeSeries != null)
            {
                var queryParams = timeSeries.TimeSeriesQueryParams();
                foreach (var nameValue in queryParams)
                {
                    qsb.Add(nameValue.Key, nameValue.Value);
                }
            }

            var pathNvc = new NameValueCollection
            {
                { "symbol", symbol },
                { "period", period.GetDescriptionFromEnum() }
            };

            return(await executor.ExecuteAsync <IEnumerable <AdvancedFundamentalsResponse> >(urlPattern, pathNvc, qsb));
        }
Example #3
0
 public TimeSeries(TimeSeriesPeriod period)
 {
     this.period = period;
 }