Tax and customs exchange rates
A tax return or customs declaration in a foreign currency has to be converted to local currency, and the rate is usually set by the authority, not the market. Using another rate can change the tax or duty owed.
How authorities publish rates
| Pattern | What it means for software |
|---|---|
| Fixed rate per week or month | Look up the rate by the period the transaction falls in, not by the day. |
| New table on fixed days of the month | The rate changes on notification days only; store the effective date range. |
| Yearly average or year-end rate | Used for converting annual income or balances, one rate per currency per year. |
| Points to the central bank rate | Use the central bank table for the date the rules name, often the day before. |
Common cases
- VAT on foreign-currency invoices. In the EU, the VAT Directive lets member states accept the ECB rate or a national market rate. The UK's HMRC publishes monthly rates for VAT and customs. See VAT exchange rates by API.
- Customs duty. Customs authorities publish their own tables for import valuation. The customs exchange rate API lists the countries covered.
- US foreign accounts. FBAR and Form 8938 filers use the Treasury Reporting Rates of Exchange for December 31.
Fetching an authority's table
Tax and customs authorities use the same endpoints as central banks, with their own codes. For example, the US Treasury reporting rates:
curl -H "Authorization: Bearer $ALLRATES_KEY" \
https://allratestoday.com/api/v1/central-bank/ustreasury/latest
The tax and customs exchange rate API page lists all 68 authorities with their codes and schedules.