public async Task <IActionResult> AverageExchangeRate( [FromRoute] string baseSymbol, [FromRoute] string targetSymbol, [FromServices] IExchangeRateService exchangeRateService, [FromServices] IValidationService validationService) { if (!validationService.DoesConfigurationPairExist(baseSymbol, targetSymbol)) { return(BadRequest($"Not configured symbols {baseSymbol} and {targetSymbol} ")); } return(await HandleRequest(exchangeRateService.AverageExchangeRateFor7Days(baseSymbol, targetSymbol))); }