Wiki/Finance & Settlements/Exchange Rates: Where the Numbers Come From
04Finance & Settlements2 min read

Exchange Rates: Where the Numbers Come From

The H/refresh-rates cron, the override mechanism for known-bad rates, and the variance alerting that catches rate-feed problems before they affect settlements.

Exchange rates are infrastructure most users don’t think about. They become visible only when something’s wrong — a rate spike that wasn’t a real spike (the feed glitched), a missing rate for a currency the tenant just started using, a historical rate that was overwritten when it shouldn’t have been. The platform handles each case.

The cron

/api/cron/refresh-rates runs every morning. It pulls the latest rates from the configured provider, validates them (no zero rates, no rates that moved more than X% from yesterday without a flag), and inserts new rows into exchange_rates. The previous day’s rates aren’t overwritten — they stay as historical, queryable for reports.

Variance alerting

If a rate moves more than the configured threshold (default 5%) without a flagged event, the platform pages the admin: "EUR/GBP moved 7% overnight, please verify." The threshold catches feed glitches (a rate of 0.0001 instead of 1.08) before they propagate into settlements. The admin can confirm or override the rate from /admin/exchange-rates.

Manual override

Some rates need to be set manually: a tenant trades a currency the rate provider doesn’t cover, or a contract specifies a fixed rate for a long-running deal. /admin/exchange-rates supports per-currency overrides with effective-date ranges. The override takes precedence over the cron-fetched rate during its window.