XE API: Convert currency
Converts an amount between two currencies using XE's displayed mid-market rate. It also returns the rate time and an XE converter link. Rates are informational, not transfer quotes.
Unofficial. Not affiliated with or endorsed by XE.
Inputs
Values from the run on Oct 23, 2026, shown under Output.
- Amount, required
amount Amount to convert, for example 100.
100
Number 0 or more.
- To Currency, required
to_currency Currency to convert to, for example Japanese yen or JPY.
Japanese yen
- From Currency, required
from_currency Currency to convert from, for example euro or EUR.
euro
Input as JSON
{ "amount": 100, "to_currency": "Japanese yen", "from_currency": "euro"}Output
{ "rate": 176.1223594853344, "amount": 100, "rate_time": "2026-10-23T07:03:00Z", "inverse_rate": 0.005677870787798919, "converted_amount": 17612, "to_currency_code": "JPY", "to_currency_name": "Japanese Yen", "xe_converter_link": "https://www.xe.com/currencyconverter/convert/?Amount=100&From=EUR&To=JPY" , "from_currency_code": "EUR", "from_currency_name": "Euro"}Code
curl https://api.fous.com/v1/runs \ -H "Authorization: Bearer $FOUS_API_KEY" \ -H "Content-Type: application/json" \ -d '{"method":"xe.com/convert_currency","input":{"amount":100,"to_currency":"Japanese yen","from_currency":"euro"}}' # Save as fous.py, then run: python3 fous.pyimport json, os, timefrom urllib.error import HTTPErrorfrom urllib.request import Request, urlopenAPI = "https://api.fous.com/v1/runs" KEY = os.environ["FOUS_API_KEY"]HEADERS = { "Authorization": f"Bearer {KEY}", "Content-Type": "application/json" ,}def call(url, body=None): data = json.dumps(body).encode() if body else None request = Request(url, data, HEADERS) try: with urlopen(request, timeout=120) as r: return r.status, json.load(r) except HTTPError as error: message = json.load(error)["error"]["message"] raise RuntimeError(message) from errorstatus, run = call(API, { "method": "xe.com/convert_currency" , "input": { "amount": 100, "to_currency": "Japanese yen", "from_currency": "euro" }})# 202: still going after 30 s. Ask again until it ends.while status == 202: time.sleep(2) status, run = call(f"{API}/{run['id']}")print(json.dumps(run["data"], indent=2))// Save as fous.mjs, then run: node fous.mjsconst api = "https://api.fous.com/v1/runs" ;const headers = { Authorization: `Bearer ${process.env.FOUS_API_KEY}`, "Content-Type": "application/json" ,};let response = await fetch(api, { method: "POST", headers, body: JSON.stringify({ "method": "xe.com/convert_currency" , "input": { "amount": 100, "to_currency": "Japanese yen", "from_currency": "euro" } }), signal: AbortSignal.timeout(120_000),});let run = await response.json();// 202: still going after 30 s. Ask again until it ends.while (response.status === 202) { await new Promise((done) => setTimeout(done, 2_000)); response = await fetch(`${api}/${run.id}`, { headers }); run = await response.json();}if (!response.ok) throw new Error(run.error.message);console.log(run.data);# Connect your agent to Fous once, over MCP (Streamable HTTP):# https://api.fous.com/mcp# Set FOUS_API_KEY first: create a key at https://app.fous.com/keys.# Claude Codeclaude mcp add \ --scope user \ --transport http fous https://api.fous.com/mcp \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Codexcodex mcp add fous \ --url https://api.fous.com/mcp \ --bearer-token-env-var FOUS_API_KEY# Cursor, VS Code, Windsurf, Cline and morenpx -y add-mcp https://api.fous.com/mcp -g -n fous \ --header "Authorization: Bearer ${FOUS_API_KEY:?Set FOUS_API_KEY to your Fous API key}"# Then ask your agent:# "Use Fous to run xe.com/convert_currency# with {"amount":100,"to_currency":"Japanese yen","from_currency":"euro"}"Over HTTP, the answer’s data holds the output. A run still going after 30 seconds answers 202 with its id: ask GET /v1/runs/{id} until it ends.
Schema
Input schema
{ "type": "object", "required": [ "amount", "from_currency", "to_currency" ], "properties": { "amount": { "type": "number", "minimum": 0, "description": "Amount to convert, for example 100." }, "to_currency": { "type": "string", "minLength": 1, "description": "Currency to convert to, for example Japanese yen or JPY." }, "from_currency": { "type": "string", "minLength": 1, "description": "Currency to convert from, for example euro or EUR." } }}Output schema
{ "type": "object", "required": [ "amount", "from_currency_code", "from_currency_name", "to_currency_code", "to_currency_name", "converted_amount", "rate", "inverse_rate", "rate_time", "xe_converter_link" ], "properties": { "rate": { "type": "number" }, "amount": { "type": "number" }, "rate_time": { "type": "string" }, "inverse_rate": { "type": "number" }, "converted_amount": { "type": "number" }, "to_currency_code": { "type": "string" }, "to_currency_name": { "type": "string" }, "xe_converter_link": { "type": "string" }, "from_currency_code": { "type": "string" }, "from_currency_name": { "type": "string" } }}- Price
- 1 credit per completed run (1¢ with pay as you go); failed runs are free.
- Method
xe.com/convert_currency- Returns
- converted amount, rate, inverse rate, rate time, currency names, XE link
Use it from your agent
Give your agent this line. It reads SKILL.md, gets a Fous API key and connects the Fous MCP server. Its run then takes the method xe.com/convert_currency with the inputs above.
Ask your agent
- How much is 250 euros in Japanese yen right now?
- Convert 1000 US dollars to British pounds at today's rate
- What is the current EUR to JPY rate for 75 euros?
- I need to know how many Canadian dollars 500 Mexican pesos equals
- On xe.com, what does 320 Swiss francs come to in Australian dollars?
See more
All XE methodsGets XE's daily mid-market exchange rate for a past UTC date and converts an amount with it.
xe.com/get_historical_rateConverts an amount between two currencies using the current Google Finance quote. Rates may be delayed.
google.com/convert_currencyGets Wise's current mid-market exchange rate and converted amount for two currencies, with optional daily rate history.
wise.com/get_exchange_rateConverts an amount between currencies using ECB euro reference rates, including euro and cross-currency conversions. Uses the latest preceding published rate when the date has none.
ecb.europa.eu/convert_currencyCompares what recipients get from Wise and other providers for a transfer amount and currency pair, with fees, rates and delivery times.
wise.com/compare_transfer_costsGets the official ECB euro reference exchange rates for a day, or the latest published day. Weekends, holidays and dates before publication return the previous published day.
ecb.europa.eu/get_euro_exchange_ratesConverts a US dollar amount from one month or annual average to another using the US city average CPI-U for all items, not seasonally adjusted. Defaults to the latest published month.
bls.gov/calculate_inflationCompares living costs in two Numbeo cities: six price and purchasing-power differences, plus the monthly take-home salary needed in the destination for a similar standard of living (rent assumed in both cities).
numbeo.com/compare_cost_of_living