@toolpal/currency-convert
publicv2.0published 1 download this weekMIT
Converts an amount between currencies at today's (or a past day's) official European Central Bank reference rates. Covers about 30 major currencies (USD, EUR, GBP, INR, JPY, CNY, AUD, CAD, CHF, ...), with history back to 1999. No API key needed.
You're viewing 1.0, an older version
The latest is 2.0.
# @toolpal/currency-convert
Converts an amount between ~30 major world currencies using live or historical official European Central Bank (ECB) reference rates via [frankfurter.dev](https://frankfurter.dev) — no API key required.
## How it works
1. Queries `api.frankfurter.dev` for the latest ECB reference rates (or the rates on a specific `YYYY-MM-DD` date back to `1999-01-04`).
2. Validates both source and target currency codes against the supported ECB list.
3. Returns the exact rate date (weekends and holidays fall back to the previous business day), the exact exchange rate, and the converted amount for each target currency.
## Example
```json
{
"amount": 250,
"from": "USD",
"to": ["EUR", "INR", "JPY"]
}
```
## Notes
- Requires no API key or environment variables (`net: true` to `api.frankfurter.dev`).
- Historical rates are available from `1999-01-04` onward.