Toolpal

@toolpal/currency-convert

public

v2.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.

Example

Verified from build

Real input and sandbox-captured output from this version.

Convert USD to EUR, INR, and JPY

Input
{
  "to": [
    "EUR",
    "INR",
    "JPY"
  ],
  "from": "USD",
  "amount": 250
}
OutputSandbox run
{
  "from": "USD",
  "amount": 250,
  "source": "European Central Bank reference rates, via frankfurter.dev",
  "rateDate": "2026-11-20",
  "conversions": [
    {
      "rate": 0.90992,
      "amount": 227.48,
      "currency": "EUR"
    },
    {
      "rate": 92.68,
      "amount": 23170,
      "currency": "INR"
    },
    {
      "rate": 158.64,
      "amount": 39660,
      "currency": "JPY"
    }
  ]
}

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

  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

{
  "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.

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

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[]
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"
          }
        }
      }
    }
  }
}