Skip to main content
GET
https://api.xchangeapi.com/
convert?amount=
{amount}
&from=
{from}
&to=
{to}
Currency conversion
curl --request GET \
  --url 'https://api.xchangeapi.com/convert?amount={amount}&from={from}&to={to}' \
  --header 'api-key: <api-key>'
{
  "info": {
    "timestamp": "1766937316.276",
    "rate": 1.17697
  },
  "query": {
    "to": "USD",
    "amount": 10,
    "from": "EUR"
  },
  "result": 11.7697
}
Convert a specific amount from one currency to another using the latest available exchange rates. This endpoint performs real-time currency conversion calculations, making it easy to handle cross-currency transactions in your application. The returned data includes the timestamp of the conversion rate used, ensuring transparency for financial calculations.
Note on Precision: Some currency pairs are returned with a multiplier (e.g., 100 or 1000) to ensure high precision.

Query parameters

from
string
required
The 3-letter currency code of the source currency (e.g., USD, EUR). See the list of available pairs.
to
string
required
The 3-letter currency code of the target currency (e.g., GBP, JPY). See the list of available pairs.
amount
decimal
required
The value to convert.

Response

info
object
Metadata about the conversion rate used.
timestamp
string
The Unix timestamp (epoch) when the rate was collected.
rate
string
The exchange rate used for this conversion.
query
object
Echoes the parameters used in the request.
from
string
Source currency code.
to
string
Target currency code.
amount
decimal
Amount converted.
result
string
The calculated converted amount.
{
  "info": {
    "timestamp": "1766937316.276",
    "rate": 1.17697
  },
  "query": {
    "to": "USD",
    "amount": 10,
    "from": "EUR"
  },
  "result": 11.7697
}