Part of the Forex Reference Suite. One request converts an amount from one currency into another at the latest rate and returns the rate that was used, the result and the time of the rate. The rates are updated every 5 minutes. Any two of the 156 supported currencies can be combined.
https://api.iban.com/clients/api/currency/convert/?api_key=YOUR_API_KEY&format=json&from=USD&to=EUR&amount=120https://api.iban.com/clients/api/currency/convert/format=xml returns the same data as XML.| Parameter | Required | Value | Description |
|---|---|---|---|
api_key | yes | string | Your personal key, shown under API Access. |
from | yes | string, 3 letters | ISO 4217 code of the currency to convert from, for example USD. Lower case is accepted. |
to | yes | string, 3 letters | ISO 4217 code of the currency to convert to, for example EUR. Lower case is accepted. |
amount | yes | number | The amount to convert, in the from currency; decimals with a point (12.50) are accepted. |
format | no | json or xml | Format of the answer. JSON when omitted. |
Replace YOUR_API_KEY with the key from API Access.
curl "https://api.iban.com/clients/api/currency/convert/?api_key=YOUR_API_KEY&format=json&from=USD&to=EUR&amount=120"The answer to the example request, recorded on 26 November 2026:
{
"time": "11-26-2026 12:31:09",
"timestamp": 1795696269,
"from": "USD",
"to": "EUR",
"amount": "120",
"rate": 0.91145,
"convert_result": 109.374
}| Field | Type | Description |
|---|---|---|
time | string | Time of the rate that was used in UTC, MM-DD-YYYY hh:mm:ss. The rates are updated every 5 minutes. |
timestamp | number | The same time as Unix time. |
from | string | The source currency of the request, in upper case. |
to | string | The target currency of the request, in upper case. |
amount | string | The amount of the request as it was sent, as a string ("120", "12.50"). |
rate | number | The exchange rate used: the value of one unit of from in to. |
convert_result | number | amount multiplied by rate. |
With format=xml the root element is result and the fields are child elements with the same names (in the order time, timestamp, from, to, rate, amount, convert_result). An error element is always present; in a successful answer its code and message are empty:
<?xml version="1.0"?>
<result>
<time>11-26-2026 12:31:09</time>
<timestamp>1795696269</timestamp>
<from>USD</from>
<to>EUR</to>
<rate>0.91145</rate>
<amount>120</amount>
<convert_result>109.374</convert_result>
<error>
<code/>
<message/>
</error>
</result>When the request is refused the data elements are empty and error is filled:
<?xml version="1.0"?>
<result>
<time/>
<timestamp/>
<from/>
<to/>
<rate/>
<amount/>
<convert_result/>
<error>
<code>401</code>
<message>API Key is invalid</message>
</error>
</result>A refused request is answered with an error object instead of the data. code is a string:
{"error":{"code":"401","message":"API Key is invalid"}}| Code | Type | Message | What to do |
|---|---|---|---|
401 | Account | API Key is invalid | Check the key under API Access. |
402 | Account | Subscription expired | Renew the Forex Reference Suite service under My Services. |
403 | Account | You have no access to this API | The Forex Reference Suite service is not on the account. |
405 | Account | IP Address not allowed | Add the address of your server to the access list of the key. |
406 | Account | No queries available | The query balance is used up; refill the service. |
407 | Input | FROM currency not supported | Send a supported ISO 4217 code as from. |
408 | Input | TO currency not supported | Send a supported ISO 4217 code as to. |
409 | Input | Invalid amount | Send a number as amount. |
A request without the required parameters is not answered with an error object: it is refused with an HTTP error status (400 Bad Request), so send every required parameter. 500 (“Internal Server Error. Contact Support.”) is a problem on our side: retry later and contact support if it persists.
The services endpoint lists every service on your account with its remaining queries and expiry date, and does not use a query. This API belongs to the service Forex Reference Suite.
https://api.iban.com/clients/api/v4/services/?api_key=YOUR_API_KEY&format=jsonRelated: Exchange Rates API, the other API of the Forex Reference Suite.