[HttpGet("/GetIndicatorTD/{function}/{symbol}/{days}")] //indicator == function public IActionResult GetIndicatorTD(string function, string symbol, string days) { int numOfDays = Int32.Parse(days); string tdResponse = TwelveData.CompleteTwelveDataRequest(function, symbol).Result; decimal tdCompositeScore = TwelveData.GetCompositeScore(symbol, function, tdResponse, numOfDays); return(new ContentResult { StatusCode = 200, Content = "Success! Composite Score for function " + function + ": " + tdCompositeScore }); }
//Used internally for cache loading public static CompositeScoreResult GetCompositeScoreInternalTD(string symbol, Security quote) { return(TwelveData.GetCompositeScoreResult(symbol, quote)); }
public CompositeScoreResult GetCompositeScoreTD(string symbol) { Security quote = YahooFinance.GetQuoteAsync(symbol).Result; return(TwelveData.GetCompositeScoreResult(symbol, quote)); }