public List <SmaIndicator> GetSma(string ticker, int period, string interval) { string url = AlphaVantageApi.GetSMAUrl(ticker, period, interval); JObject result = JObject.Parse(client.GetStringAsync(url).Result); JObject analysis = result[$"Technical Analysis: SMA"].Value <JObject>(); return(SmaIndicator.ParseSmaArray(analysis, 50)); }
public List <StockTick> Get(string ticker) { string url = AlphaVantageApi.GetTimeSeriesUrl(AlphaVantageApi.TIME_SERIES.TIME_SERIES_DAILY, ticker); JObject result = JObject.Parse(client.GetStringAsync(url).Result); JObject stockPrices = result[$"Time Series ({AlphaVantageApi.GetDescription(AlphaVantageApi.TIME_INTERVALS.Daily)})"].Value <JObject>(); return(StockTick.ParseArrayPrice(stockPrices, 50)); }