Get a bank's official published rates
get_official_ratesRetrieve official, citable exchange rates from central banks, tax authorities, and customs agencies for compliance, accounting, and invoicing. Query by bank, date, or currency pair.
Instructions
OFFICIAL rates a named institution published — 'what is the ECB rate for USD?', 'Bank of Japan rate today', 'HMRC rate for invoicing'. These are the fixed, citable rates for compliance, tax, customs and accounting — NOT live market rates (use get_exchange_rate for those). Omit date for the newest published table (no API key needed); give date (API key, paid plan) for the table in force that day — weekends/holidays roll back to the last published date and the response's rate_date says which. Omit source/target for the full table; give both for one pair — cross-computed inside the bank's own table when not directly published, flagged derived. Always cite the returned rate_date.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bank | Yes | Source code from list_central_banks, e.g. 'ecb', 'fed', 'boe', 'rbi', 'hmrc'. Case-insensitive. | |
| date | No | Optional YYYY-MM-DD. Omit for the latest table. | |
| source | No | Optional. With target, narrows to one pair. | |
| target | No | Optional. With source, narrows to one pair. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bank | Yes | ||
| rate | No | ||
| rates | No | ||
| stale | No | True when the institution is behind its publication schedule | |
| source | No | ||
| target | No | ||
| derived | No | True when cross-computed inside the bank table | |
| rate_date | Yes | Publication date of the table — cite this, not today | |
| rate_type | No | ||
| attribution | No |