NBP currency rate history
nbp_rate_seriesGet a historical time series of NBP rates for one currency against PLN: either the last N published quotes (last_n, default 30, max 255) or an explicit start_date/end_date window (max 93 days per query — NBP's hard limit; chain calls for longer spans). Quotes exist only for publication days: business days for tables 'a'/'c', Wednesdays for 'b'. Data starts 2002-01-02.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Three-letter ISO 4217 currency code (e.g. USD, EUR, CHF). Case-insensitive. | |
| table | No | NBP table: 'a' (default) = official mid rates of ~35 major currencies, published every business day; 'b' = mid rates of ~115 less-traded currencies, published Wednesdays; 'c' = bid/ask (buy/sell) rates of major currencies, published every business day. | |
| last_n | No | Return the last N published quotes (1-255). Default 30. Mutually exclusive with start_date/end_date. | |
| end_date | No | Window end (YYYY-MM-DD, inclusive). Requires start_date; span ≤ 93 days. | |
| no_cache | No | Force a fresh NBP fetch and bypass this server's result cache. Default false. | |
| start_date | No | Window start (YYYY-MM-DD, inclusive). Requires end_date. |