Esempio n. 1
0
        public async Task SplitAsyncTest(string symbol, SplitRange range)
        {
            var response = await prodClient.Stock.SplitAsync(symbol, range);

            Assert.IsNotNull(response);
            Assert.GreaterOrEqual(response.Count(), 0);
        }
Esempio n. 2
0
        public async Task SplitsBasicAsyncTest(string symbol, SplitRange range)
        {
            var response = await sandBoxClient.StockFundamentals.SplitsBasicAsync(symbol, range);

            Assert.IsNull(response.ErrorMessage);
            Assert.IsNotNull(response.Data);
        }
Esempio n. 3
0
        public async Task SplitAsyncTest(string symbol, SplitRange range)
        {
            var response = await sandBoxClient.Stock.SplitAsync(symbol, range);

            Assert.IsNull(response.ErrorMessage);
            Assert.IsNotNull(response.Data);
            Assert.GreaterOrEqual(response.Data.Count(), 1);
        }
Esempio n. 4
0
        public async Task <IEnumerable <SplitV1Response> > SplitAsync(string symbol, SplitRange range = SplitRange._1m)
        {
            const string urlPattern = "stock/[symbol]/splits/[range]";

            var qsb = new QueryStringBuilder();

            var pathNvc = new NameValueCollection {
                { "symbol", symbol }, { "range", range.ToString().Replace("_", string.Empty) }
            };

            return(await _executor.ExecuteAsyncLegacy <IEnumerable <SplitV1Response> >(urlPattern, pathNvc, qsb));
        }
Esempio n. 5
0
        public async Task <IEXResponse <IEnumerable <SplitBasicResponse> > > SplitsBasicAsync(string symbol, SplitRange range = SplitRange.OneMonth)
        {
            const string urlPattern = "stock/[symbol]/splits/[range]";

            var qsb = new QueryStringBuilder();

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

            return(await executor.ExecuteAsync <IEnumerable <SplitBasicResponse> >(urlPattern, pathNvc, qsb));
        }
Esempio n. 6
0
        public async Task SplitsBasicAsyncUnkownSymbolTest(string symbol, SplitRange range)
        {
            var response = await sandBoxClient.StockFundamentals.SplitsBasicAsync(symbol, range);

            Assert.IsTrue(response.ErrorMessage.Equals("NotFound - Unknown symbol", StringComparison.InvariantCultureIgnoreCase));
        }