class YahooStockProvider implements LatestRateProvider, HistoricalRateProvider {

	@Override
	public List<Quote> getRates() throws IOException {
		List<Quote> rates = new ArrayList<>();

		List<Pair> symbols = pairService.getAllFromProvider("YAHOO");

		if (symbols.isEmpty()) {
			log.trace("symbols list is empty");
			return rates;
		}

		YahooModel result = rt.getForObject(format(url, createPairsString(symbols)), YahooModel.class);

		return result.getQuoteResponse().getResult().stream()
				.map(yf -> new Quote(getSource(symbols, yf.getSymbol()), getCurrency(symbols, yf.getSymbol()),
						BigDecimal.valueOf(yf.getRegularMarketPrice()), toInstant(yf.getRegularMarketTime())))
				.collect(Collectors.toList());
	}

}