to call some external API regularly, to always have some fresh exchange rate (I don't know how often this can change -- but looking the rate up once every couple of minutes should do)
This could be done via some sort of cron job, independantly of your web-application that uses this exchange rate
and to keep the exchange rate in cache for a couple of minutes :
so you don't call the external API too often
and don't rely on it too much (i.e. your site will still work if the site you're fetching the rate from is down for a couple of minutes -- and if it takes time to fetch that data, it won't slow your website down, as it's fetched regularly by a cron job)