Currency conversion at ECB reference rates

Convert an amount between currencies at the euro reference rates of the European Central Bank, for today or a date in the last 90 days.

CHF 0.002 / callNot open to the public yet
Thomas arithmometer, ca. 1820
Thomas arithmometerca. 1820

Details

Covers: the about 30 currencies the ECB publishes (CHF, EUR, USD, GBP, JPY, CNY, SEK, NOK, DKK, PLN, CZK, HUF, AUD, CAD and more). Cross rates go through EUR.

Rates are published around 16:00 CET on TARGET business days; for other days the last earlier rate is used and its date is returned.

Does not cover: live market rates, crypto. Not for trading.

Price: CHF 0.002 per call. Source: ECB.

Example: {"amount":"100","from":"CHF","to":"EUR"} → {"value":"…","rate":"…","rate_date":"…"}.

Status

The tools are not open to the public yet.

Input schema JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "amount",
    "from",
    "to"
  ],
  "properties": {
    "amount": {
      "type": [
        "string",
        "number"
      ],
      "description": "A number. Send a string such as \"0.1\" to keep it exact."
    },
    "from": {
      "type": "string",
      "pattern": "^[A-Z]{3}$"
    },
    "to": {
      "type": "string",
      "pattern": "^[A-Z]{3}$"
    },
    "date": {
      "type": "string",
      "format": "date",
      "description": "Rate date. Default: latest."
    },
    "decimals": {
      "type": "integer",
      "minimum": 0,
      "maximum": 100,
      "description": "Round the result to this many decimal places."
    },
    "significant": {
      "type": "integer",
      "minimum": 1,
      "maximum": 60,
      "default": 30,
      "description": "Significant digits for non-terminating results. Default 30."
    },
    "round_to": {
      "type": "string",
      "pattern": "^\\d*\\.?\\d+$",
      "description": "Round to a multiple of this step, e.g. \"0.05\" for Swiss cash rounding."
    },
    "rounding": {
      "type": "string",
      "enum": [
        "half_up",
        "half_even",
        "half_down",
        "up",
        "down",
        "toward_zero",
        "away_from_zero"
      ],
      "description": "Rounding mode for decimals and round_to. Default half_up."
    }
  },
  "examples": [
    {
      "amount": "100",
      "from": "CHF",
      "to": "EUR",
      "decimals": 2
    }
  ]
}

More in Exact maths and money