The getExchangeRate function