π± FX Rates & Routes
Currency exchange rates and routing configuration. The FX subsystem stores daily rates and manages multi-provider data supply chains.
π ER Diagram
erDiagram
FX_RATE
FX_CURRENCY_PAIR_SOURCE
FX_RATE {
date date
string base
string quote
decimal rate
}
FX_CURRENCY_PAIR_SOURCE {
string base
string quote
string provider_code
int priority
json provider_params
}
π Tables
π± FX_RATE
Stores daily exchange rates. Each row represents the rate for a currency pair on a specific date.
- π€ Alphabetical ordering: Enforces
base < quote(alphabetical) to prevent duplicate storage. For example, EUR/USD is always stored asbase=EUR, quote=USDregardless of the query direction. The system automatically inverts the rate when needed. - π Uniqueness: The composite key
(date, base, quote)ensures no duplicate rates.
π FX_CURRENCY_PAIR_SOURCE
Configures which data provider to use for each currency pair. Supports multi-provider fallback via priority ordering.
- ποΈ
provider_code: References a registered FX provider (ECB, FED, BOE, SNB, etc.) - π’
priority: Lower number = higher priority. If priority-1 provider fails, the system tries priority-2. - βοΈ
provider_params(JSON): Provider-specific configuration if needed.
The provider system uses the Registry Pattern for extensibility.
π Data Supply Chains
For exotic currency pairs (e.g., RON/JPY), the system can construct multi-step conversion chains through intermediate currencies. For example:
This is configured via FX Configuration & Routing and executed by the FX Chain Algorithm.
π Related Documentation
- βοΈ FX Architecture β Multi-provider FX system design
- π FX Configuration & Routing β Chain routing algorithm
- ποΈ FX Providers List β ECB, FED, BOE, SNB details
- π FX Rates (User Guide) β How to manage currency pairs