public async Task <ActionResult <CalculatedRatesDateRateResponse> > GetCalculatedRates(Currency baseCurrency, Currency targetCurrency, [FromQuery] List <DateTime> dates)
        {
            try
            {
                // doesn't allow duplicate date entries
                if (!ListsUtil.CheckForDuplicates(dates))
                {
                    throw new DuplicateTypeException("date");
                }

                var request = new CalculatedRatesRequest
                {
                    BasicCurrency  = baseCurrency,
                    TargetCurrency = targetCurrency,
                    Dates          = dates
                };

                CustomObjectValidator.Validate(request);

                var response = await _calculatedRatesService.GetExhangeRates(request);

                return(Ok(response));
            }
            catch (DuplicateTypeException de)
            {
                return(BadRequest(de.Message));
            }
            catch (AggregateException ex)
            {
                var messages = ErrorUtil.ValidationErrorMessages(ex);
                return(BadRequest(messages));
            }
            catch (EmptyRatesException ere)
            {
                return(BadRequest(ere.Message));
            }
            catch (Exception ex)
            {
                return(BadRequest(ex.Message));
            }
        }