Providers
| Provider | Description |
|---|---|
PTAX_API | Brazilian Central Bank (PTAX) — primary for BRL rates |
EXCHANGE_RATE_API | ExchangeRateAPI — secondary/fallback |
MANUAL | Manually entered rates — final fallback |
Rate Lookup
When an exchange rate is needed:- Check for today’s rate for the source → target currency pair
- If not found, fetch from PTAX API
- If PTAX fails, fetch from ExchangeRateAPI
- If both fail, use the latest MANUAL rate
Storage
Rates are stored with a unique constraint on(date, source, target). This ensures one rate per currency pair per day.