I noticed a few things that had to be changed. function names with exchangerate in them should be changed to exchange_rate.
Additionally I added a column to exchange_rate called post_date that is a date field, and a primary key of (buy_curr, sell_curr, post_date).
This seems widely applicable, well beyond accounting apps, so thinking of releasing it as a PostgreSQL extension under a BSD license (feedback on that would be worthwhile as well).