get_fx_rate
Retrieve historical foreign exchange rates from a local cache, automatically falling back to the most recent rate within a configurable lookback period to handle weekends and holidays.
Instructions
Look up the historical FX rate for a date and currency from the local cache (foreign per 1 USD). USD always returns 1.0. Falls back to the most recent rate within lookback_days (handles weekends/holidays). Returns null if no rate found in the lookback window. Run sync_fx_rates first to populate the cache.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | YYYY-MM-DD | |
| currency | Yes | Currency code: USD/KRW/JPY/EUR/CNY/GBP | |
| lookback_days | No | Days to look back if exact date not cached |