コード例 #1
0
        public async Task GetIntradaySeriesTest()
        {
            _apiKeyServiceMock.Setup(q => q.GetKey()).Returns(_realKeySrvice.GetKey());
            var result = await _alphaVantageServiceReal.GetIntradaySeriesAsync(_testSymbol, AlphaVantageConnector.Enums.Intervals.FiveMin);

            Assert.True(result?.Any() == true);
        }
コード例 #2
0
        public async Task <IActionResult> GetIntradaySeriesAsync(string symbol, Intervals interval, OutputSize outputSize = OutputSize.Full)
        {
            var result = await _alphaVantageService.GetIntradaySeriesAsync(symbol, interval, outputSize);

            return(Ok(new
            {
                symbol,
                interval = interval.ToString(),
                outputSize = outputSize.ToString(),
                Data = result,
            }));
        }