Next: , Previous: Readline Support, Up: Top

17 Updating Currency Exchange Rates

The units program includes currency exchange rates and prices for some precious metals in the database. Of course, these values change over time, sometimes very rapidly, and units cannot provide real time values. To update the exchange rates run the units_cur, which rewrites the files containing the currency rates, typically /usr/share/units/currency.units. This program requires python and the unidecode package, and must be run with suitable permissions to write the file. To keep the rates updated automatically, run it using a cron job on a Unix-like system, or a similar scheduling program on a different system. Currency exchange rates are taken from Time Genie ( and precious metals pricing from Packetizer ( These sites update once per day, so there is no benefit in running the update script more often than daily. You can run units_cur with a filename specified on the command line and it will write the data to that file. If you give ‘-’ for the file it will write to standard output.