๐ฑ 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 โ ECB, FED, BOE, SNB technical details
- ๐ FX Rates (User Guide) โ How to manage currency pairs