Skip to main content

Exchange rates and rate locks

One rate per pair per day​

The fx-daily-import job stores the configured source's daily rates (Bank of Canada Valet, CAD pivot, so any pair is computed through CAD). Rates are never overwritten. The rate for a date is the latest publication on or before it, which covers weekends and holidays.

Locks​

A lock fixes the rate a committed line uses:

  • The first lock for a pair and business date fixes that day's rate. Every later lock that day returns it, so all lines committed on the same day share one rate.
  • Editing a line keeps its lock unless the transaction date changes. A new line gets the current rate.
  • When to lock (PO issuance, invoice or payment) is accounting's decision. The lock is a plain API call, so the service supports any of them.

Precision​

Rates are kept to 12 decimal places and intermediate amounts to 6. Rounding to the currency's minor units happens only at the edges (API responses and events), never in the middle of a calculation.