convert
Convert foreign currency to PLN for Polish bookkeeping using NBP mid-rates. Use the last business day before the invoice date as the rate date.
Instructions
Convert an amount from one currency to another using NBP mid-rate (Table A, or B if not in A). Primary use case: converting a foreign-currency invoice to PLN for Polish bookkeeping. Polish tax law requires using the NBP mid-rate from the last business day BEFORE the invoice date — pass that date as rate_date, not the invoice date itself. Returns the amount, the rate used, and the effective date.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | Yes | Amount to convert | |
| rate_date | No | Optional YYYY-MM-DD. Defaults to the latest published rate. | |
| to_currency | No | Target currency (default PLN) | PLN |
| from_currency | Yes | Source currency, 3-letter ISO 4217 |