ezForex
Toggle sidebar
Log in
Convert

Convert an amount between two three-letter currency codes using the latest rate snapshot. Amounts may route through the base currency when a direct pair is unavailable.

GET
/api/convert/{from}/{amount}/{to}
Bearer auth

Subject to a daily quota. See Rate limits.

Path parameters
Name Type Description
from string (3 letters) Source currency code, e.g. EUR
amount number > 0 Amount to convert; decimals allowed
to string (3 letters) Target currency code, e.g. ZAR
Successful response

HTTP 200

{
  "from": "EUR",
  "from_amount": 100,
  "to": "ZAR",
  "to_amount": 1904.12,
  "rate": 19.04,
  "path": {
    "EUR": 100,
    "USD": 116.42,
    "ZAR": 1904.12
  }
}

The path object shows intermediate amounts when conversion routes through another currency (typically the import base).

Example
curl https://ezforex.your-developer.co.za/api/convert/EUR/100/ZAR \
  -H "Accept: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN"
Errors
  • 401 — Missing or invalid Bearer token.
  • 422 — Invalid parameters, conversion disabled, or a required rate is missing.
  • 429 — Daily convert quota exceeded.