Ejemplo n.º 1
0
        public async Task <IActionResult> GetInvestmentOptions(decimal budget)
        {
            var cryptoInvestments = await _tradingService.GetBestTradingOptionsForCrypto(budget);

            var tradingInvesments = await _tradingService.GetBestTradingOptionsForAssets(budget);

            var mappedCryptoInvestments  = _mapper.Map <List <GetInvestmentOptionsResponse> >(cryptoInvestments);
            var mappedTradingInvestments = _mapper.Map <List <GetInvestmentOptionsResponse> >(tradingInvesments);

            return(Ok(new SuccessResponse <IEnumerable <GetInvestmentOptionsResponse> >(
                          mappedCryptoInvestments.Concat(mappedTradingInvestments))));
        }