@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.
Converts an amount between ~30 major world currencies using live or historical official European Central Bank (ECB) reference rates via frankfurter.dev — no API key required.
How it works
- Queries
api.frankfurter.devfor the latest ECB reference rates (or the rates on a specificYYYY-MM-DDdate back to1999-01-04). - Validates both source and target currency codes against the supported ECB list.
- 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
{
"amount": 250,
"from": "USD",
"to": ["EUR", "INR", "JPY"]
}Notes
- Requires no API key or environment variables (
net: truetoapi.frankfurter.dev). - Historical rates are available from
1999-01-04onward.
Input
Validated before the workflow runs.
- torequiredstring[]
Target currency codes, e.g. ["EUR", "INR"]
min items 1 · max items 30
- datestring
Use the rates of this day (YYYY-MM-DD); latest by default
pattern ^\d{4}-\d{2}-\d{2}$
- fromrequiredstring
ISO 4217 code of the source currency, e.g. USD
pattern ^[A-Za-z]{3}$
- amountnumber
Amount in the source currency, 1 by default
≥ 0
| Field | Type | Description |
|---|---|---|
| torequired | string[] | Target currency codes, e.g. ["EUR", "INR"] min items 1 · max items 30 |
| date | string | Use the rates of this day (YYYY-MM-DD); latest by default pattern ^\d{4}-\d{2}-\d{2}$ |
| fromrequired | string | ISO 4217 code of the source currency, e.g. USD pattern ^[A-Za-z]{3}$ |
| amount | number | Amount in the source currency, 1 by default ≥ 0 |
JSON Schema
{
"type": "object",
"required": [
"from",
"to"
],
"properties": {
"to": {
"type": "array",
"items": {
"type": "string",
"pattern": "^[A-Za-z]{3}$"
},
"maxItems": 30,
"minItems": 1,
"description": "Target currency codes, e.g. [\"EUR\", \"INR\"]"
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Use the rates of this day (YYYY-MM-DD); latest by default"
},
"from": {
"type": "string",
"pattern": "^[A-Za-z]{3}$",
"description": "ISO 4217 code of the source currency, e.g. USD"
},
"amount": {
"type": "number",
"minimum": 0,
"description": "Amount in the source currency, 1 by default"
}
}
}Output
Validated before your agent receives it.
- fromrequiredstring
- amountrequirednumber
- sourcerequiredstring
- rateDaterequiredstring
The business day the rates were published; weekends and holidays fall back to the day before
- conversionsrequiredobject[]
| Field | Type | Description |
|---|---|---|
| fromrequired | string | - |
| amountrequired | number | - |
| sourcerequired | string | - |
| rateDaterequired | string | The business day the rates were published; weekends and holidays fall back to the day before |
| conversionsrequired | object[] | - |
JSON Schema
{
"type": "object",
"required": [
"amount",
"from",
"rateDate",
"conversions",
"source"
],
"properties": {
"from": {
"type": "string"
},
"amount": {
"type": "number"
},
"source": {
"type": "string"
},
"rateDate": {
"type": "string",
"description": "The business day the rates were published; weekends and holidays fall back to the day before"
},
"conversions": {
"type": "array",
"items": {
"type": "object",
"required": [
"currency",
"rate",
"amount"
],
"properties": {
"rate": {
"type": "number"
},
"amount": {
"type": "number"
},
"currency": {
"type": "string"
}
}
}
}
}
}