示例#1
0
        [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
            });
        }
示例#2
0
 //Used internally for cache loading
 public static CompositeScoreResult GetCompositeScoreInternalTD(string symbol, Security quote)
 {
     return(TwelveData.GetCompositeScoreResult(symbol, quote));
 }
示例#3
0
        public CompositeScoreResult GetCompositeScoreTD(string symbol)
        {
            Security quote = YahooFinance.GetQuoteAsync(symbol).Result;

            return(TwelveData.GetCompositeScoreResult(symbol, quote));
        }