Exemple #1
0
        public async Task <StockScore> GetRecentlySuspendedAndBlockSaleScore(string stockCode)
        {
            var score = new StockScore();
            var recentlySuspendedScore = _settingRepository.GetSettingValue <decimal>(SettingNames.Score_RecentlySuspended);
            var blockSaleScore         = _settingRepository.GetSettingValue <decimal>(SettingNames.Score_BlockSale);

            var marketActivity = await _investagramsApiService.GetLatestStockMarketActivity();

            if (marketActivity.StockSuspensionList.Any(x => x.StockCode == stockCode))
            {
                score.AddReason(recentlySuspendedScore, "Recently added to suspended list");
            }

            if (marketActivity.StockBlockSaleList.Any(x => x.StockCode == stockCode))
            {
                score.AddReason(blockSaleScore, "In block sale");
            }

            return(score);
        }
Exemple #2
0
        public async Task <ActionResult> SuspendedAndOnSale()
        {
            var model = await _investagramsApi.GetLatestStockMarketActivity();

            return(View(model));
        }