Currency converter

  • Convert between currencies using the latest exchange rates.
  • You can use multiple currencies in the counter argument to get the results for multiple currencies at once.
  • Conversion results are rounded using half-up rounding method.
  • You can adjust the precision of the results by using the precision argument.
  • The API cost for querying this endpoint is equal to the number of counter currencies requested.
GET https://api.forexapi.eu/v2/convert?amount=299.95&from=USD&to=GBP,PLN,CHF,EUR&precision=2?format=json
Arguments
Name Description Example
amount Amount to convert 100
from Base currency EUR
to Comma-separated list of counter currencies USD USD,PLN,CHF
precision Number of decimal places in the result (0-8) 4
format Output format (default "json") json xml csv
Example output
{
  "from": "USD",
  "amount": "299.95",
  "results": {
    "GBP": "235.81",
    "PLN": "1176.49",
    "CHF": "256.10",
    "EUR": "271.64"
  },
  "timestamp": 1703635718,
  "cost": 4
}
Result field name Type Description
from string Base currency
amount decimal The amount in the base currency that was converted
results object An object containing the conversion results, with each field representing a target currency code
timestamp integer UNIX timestamp of the quote
cost integer The cost of the API call against your plan's allowance
<?xml version="1.0"?>
<response>
  <from>USD</from>
  <amount>123</amount>
  <results>
    <result currency="GBP">96.78</result>
    <result currency="PLN">495.60</result>
    <result currency="EUR">113.10</result>
    <result currency="CHF">106.30</result>
  </results>
  <timestamp>2024-01-24T23:51:22Z</timestamp>
  <cost>4</cost>
</response>

Timestamp in XML is in ISO 8601 format (YYYY-MM-DDTHH:MM:SSZ). The date is in UTC.

timestamp,from,amount,GBP,PLN,EUR,CHF
"2024-01-24 23:57:21",USD,123,96.78,495.59,113.09,106.30

Timestamp in CSV is in ISO 8601 format (YYYY-MM-DD HH:MM:SS). The date is in UTC.