Calculate exchange rate by API