Skip to content

Exchange Rates API (mock data)

Realistic currency rates for converter screens, charts and tests, with the Cambodian riel built in.

Build a currency converter, a price display in riel and dollars or a rate chart without signing up for a paid feed. The Exchange Rates API returns rates for 30 currencies, including the Cambodian riel (KHR), Thai baht, Vietnamese dong, euro, yen and yuan, with English and Khmer currency names.

The numbers start from a real snapshot of the National Bank of Cambodia’s published rates (4,012 KHR per USD on 12 May 2026) and move a little every day with a fixed formula, so history looks like a real market and every server returns the same value for the same date. It is mock data: never use it for trading, payments or accounting.

Base URL https://toolorca.com/api/v1 No key · CORS open · JSON · conventions and limits

Endpoints

GET /api/v1/exchange/currencies #

The 30 currencies with ISO code, English and Khmer name, symbol, decimal places and flag code.

curl 'https://toolorca.com/api/v1/exchange/currencies'
GET /exchange/currencies
Example response
{
  "data": [
    {
      "code": "USD",
      "name": "US Dollar",
      "nameKm": "ដុល្លារអាមេរិក",
      "symbol": "$",
      "decimals": 2,
      "flag": "us"
    },
    {
      "code": "KHR",
      "name": "Cambodian Riel",
      "nameKm": "ប្រាក់រៀល",
      "symbol": "៛",
      "decimals": 2,
      "flag": "kh"
    },
    {
      "code": "EUR",
      "name": "Euro",
      "nameKm": "អឺរ៉ូ",
      "symbol": "€",
      "decimals": 2,
      "flag": "eu"
    },
    "… 27 more"
  ],
  "meta": {
    "total": 30,
    "base": "USD",
    "firstDate": "2020-01-01",
    "disclaimer": "Mock exchange rates for learning and prototyping. Not real market data: never use them for trading, payments or accounting."
  }
}

GET /api/v1/exchange/latest #

Rates for one unit of the base currency on a day (today by default).

Parameter In Type Description
base query string Base currency code (default USD). Any of the 30 codes, e.g. KHR.
symbols query string Comma-separated codes to return, e.g. KHR,THB,EUR. Default: all.
date query date YYYY-MM-DD from 2020-01-01 to today.
curl 'https://toolorca.com/api/v1/exchange/latest?base=USD&symbols=KHR,THB,VND,EUR,JPY,CNY'
GET /exchange/latest?base=USD&symbols=KHR,THB,VND,EUR,JPY,CNY
Example response
{
  "base": "USD",
  "date": "2026-11-21",
  "rates": {
    "KHR": 4018.16,
    "THB": 32.0851,
    "VND": 26204.3,
    "EUR": 0.831646,
    "JPY": 154.694,
    "CNY": 6.74243
  },
  "mock": true,
  "disclaimer": "Mock exchange rates for learning and prototyping. Not real market data: never use them for trading, payments or accounting."
}

GET /api/v1/exchange/convert #

Convert an amount from one currency to another.

Parameter In Type Description
from required query string Currency to convert from, e.g. USD.
to required query string Currency to convert to, e.g. KHR.
amount query number Amount (default 1).
date query date Use the rate of this day (default today).
curl 'https://toolorca.com/api/v1/exchange/convert?from=USD&to=KHR&amount=25'
GET /exchange/convert?from=USD&to=KHR&amount=25
Example response
{
  "from": "USD",
  "to": "KHR",
  "amount": 25,
  "rate": 4018.16,
  "result": 100453.95,
  "inverseRate": 0.00024887,
  "date": "2026-11-21",
  "mock": true,
  "disclaimer": "Mock exchange rates for learning and prototyping. Not real market data: never use them for trading, payments or accounting."
}

GET /api/v1/exchange/history #

Daily rates between two dates, ready for a line chart.

At most 366 days per request. Without symbols the first five currencies are returned.

Parameter In Type Description
base query string Base currency (default USD).
symbols query string Comma-separated codes, e.g. KHR,THB.
start query date First day (default: 6 days before end).
end query date Last day (default today).
curl 'https://toolorca.com/api/v1/exchange/history?base=USD&symbols=KHR,THB&start=2026-05-01&end=2026-05-07'
GET /exchange/history?base=USD&symbols=KHR,THB&start=2026-05-…
Example response
{
  "base": "USD",
  "start": "2026-05-01",
  "end": "2026-05-07",
  "days": 7,
  "symbols": [
    "KHR",
    "THB"
  ],
  "rates": {
    "2026-05-01": {
      "KHR": 4010.03,
      "THB": 31.5529
    },
    "2026-05-02": {
      "KHR": 4011.07,
      "THB": 31.6186
    },
    "2026-05-03": {
      "KHR": 4010.1,
      "THB": 31.6892
    },
    "2026-05-04": {
      "KHR": 4011.66,
      "THB": 31.9116
    },
    "2026-05-05": {
      "KHR": 4010.11,
      "THB": 31.8894
    },
    "2026-05-06": {
      "KHR": 4012.09,
      "THB": 31.8675
    },
    "2026-05-07": {
      "KHR": 4010.04,
      "THB": 31.8649
    }
  },
  "mock": true,
  "disclaimer": "Mock exchange rates for learning and prototyping. Not real market data: never use them for trading, payments or accounting."
}

GET /api/v1/exchange/khr #

A riel exchange table like the one banks in Cambodia publish: bid, ask and average in KHR per quote unit (for example per 100 JPY or per 1,000 VND).

Parameter In Type Description
date query date YYYY-MM-DD (default today).
curl 'https://toolorca.com/api/v1/exchange/khr'
GET /exchange/khr
Example response
{
  "date": "2026-11-21",
  "officialRate": {
    "usd": 4018,
    "text": "4,018 KHR / USD"
  },
  "data": [
    {
      "code": "USD",
      "name": "US Dollar",
      "nameKm": "ដុល្លារអាមេរិក",
      "pair": "USD/KHR",
      "unit": 1,
      "bid": 3998,
      "ask": 4038,
      "average": 4018
    },
    {
      "code": "EUR",
      "name": "Euro",
      "nameKm": "អឺរ៉ូ",
      "pair": "EUR/KHR",
      "unit": 1,
      "bid": 4807,
      "ask": 4856,
      "average": 4832
    },
    {
      "code": "THB",
      "name": "Thai Baht",
      "nameKm": "បាតថៃ",
      "pair": "THB/KHR",
      "unit": 1,
      "bid": 124.6,
      "ask": 125.9,
      "average": 125.2
    },
    "… 26 more"
  ],
  "basedOn": "National Bank of Cambodia published rates of 2026-05-12 (starting point only)",
  "snapshotDate": "2026-05-12",
  "mock": true,
  "disclaimer": "Mock exchange rates for learning and prototyping. Not real market data: never use them for trading, payments or accounting."
}

Free daily limit

The mock services (exchange rates, weather, countries, random users, content, notes, pagination, upload, webhook, QR and avatar) share a free allowance of 50 requests per day and 10 per minute for each IP address. Every response carries X-RateLimit-Daily-Limit, X-RateLimit-Daily-Remaining and X-RateLimit-Daily-Reset (seconds until the day resets); after the limit you get 429 with Retry-After. Rates change once a day, so cache them in your app.

Showing prices in riel

Cambodian apps often show both currencies. Call /exchange/convert?from=USD&to=KHR&amount=… once a day, store the rate, and round riel amounts to the nearest 100 ៛ as shops do. For a rate board, /exchange/khr gives bid and ask prices in the familiar per-unit format.

Frequently asked questions

Are these real exchange rates?

No. They are mock rates based on a real snapshot and moved by a formula. They look realistic for demos and tests but must not be used for real money.

Which currencies are included?

USD, KHR, EUR, THB, VND, CNY, CNH, JPY, GBP, AUD, CAD, CHF, HKD, SGD, MYR, KRW, LAK, MMK, IDR, INR, PHP, TWD, NZD, SEK, DKK, AED, SAR, ZAR, NGN and XDR (SDR).

Will a past date always give the same rate?

Yes. Every rate is calculated from the date, so the same request returns the same numbers on every server, which keeps tests stable.

How many requests can I make?

50 per day and 10 per minute per IP address, shared with the other mock services. Cache the daily rates to stay inside the limit.

More free APIs