		i = 0

		for currency in Currency.objects.all():
			if currency.code not in d["rates"]:
				print("Warning: Could not find rates for %s (%s)" % (currency, currency.code))
				continue

			rate = Decimal(d["rates"][currency.code]).quantize(Decimal(".0001"))
			if currency.factor != rate:
				print("Updating %s rate to %f" % (currency, rate))
				currency.factor = rate
				currency.save()
				i += 1