Introduction
AnyApi’s Currency Exchange API offers real-time foreign exchange rates, historical data, and currency conversion functionality. exchange rate api allows developers to access and retrieve up-to-date currency exchange rates for various currencies.
Features
- Currency conversation API: Currency converter API allows you to easily convert a specified amount from one currency to another.
- Realtime Currency Exchange rates: Currency rate API provides access to real-time currency exchange rates for a wide range of currencies.
- Free and reliable currency exchange API: Currency API converter is provided for free by AnyAPI, making it accessible to developers of all sizes.
Getting Started
To access the Currency Exchange and Forex rates API , you need to obtain an API key from AnyAPI.io. The API key is used for authentication and should be included in the request URL as a query parameter.
Let’s Try Sign In.
Convert currency into other currency endpoint
Send a GET request to the following URL to Convert currency into other currency
curl --request GET \
--url 'https://anyapi.io/api/v1/exchange/convert?base=USD&to=EUR&amount=10000&apiKey=YOUR_API_KEY'{
"base": "USD",
"to": "EUR",
"amount": 100,
"converted": 88.49,
"rate": 0.8849,
"lastUpdate": 1640131200
}Request parameters
Use the parameters listed below to customize your request. Mandatory parameters are indicated
Response parameters
The API returns its response in a simple, lightweight JSON format.
Get the most recent exchange rates endpoint
Send a GET request to the following URL to Get the most recent exchange rates
curl --request GET \
--url 'https://anyapi.io/api/v1/exchange/rates?base=USD&apiKey=YOUR_API_KEY'{
"lastUpdate": 1716508800,
"base": "USD",
"rates": {
"EUR": 0.9225,
"USD": 1,
"JPY": 157.0849,
"BGN": 1.8042,
"CZK": 22.8192,
"DKK": 6.883,
"GBP": 0.7864,
"HUF": 355.3321,
"PLN": 3.9256,
"RON": 4.5888,
"SEK": 10.7002,
"CHF": 0.9155,
"ISK": 138.2841,
"NOK": 10.6045,
"TRY": 32.2453,
"AUD": 1.5124,
"BRL": 5.1404,
"CAD": 1.3713,
"CNY": 7.2437,
"HKD": 7.8118,
"IDR": 16031.2546,
"ILS": 3.6717,
"INR": 83.1218,
"KRW": 1365.7196,
"MXN": 16.683,
"MYR": 4.7115,
"NZD": 1.6372,
"PHP": 58.19,
"SGD": 1.3505,
"THB": 36.6753,
"ZAR": 18.4046
}
}Request parameters
Use the parameters listed below to customize your request. Mandatory parameters are indicated
Response parameters
The API returns its response in a simple, lightweight JSON format.
Response and error codes
Whenever you make a request that fails for some reason, an error is returned also in the JSON format. The errors include an error code and description, which you can find in detail below.
| Status Code | Type | Details |
|---|---|---|
| 200 | OK | The request was successful. |
| 400 | Bad Request | The request was invalid or cannot be otherwise served. |
| 401 | Unauthorized | Authentication credentials were missing or incorrect. |
| 422 | Quota reached | The request cannot be served due to the application's rate limit having been exhausted for the resource. |
| 404 | Not Found | The requested resource could not be found. |
| 429 | Too Many Requests | The request cannot be served due to the application's rate limit having been exhausted for the resource. |
| 500 | Internal Server Error | Something went wrong on the server. |
| 503 | Service Unavailable | The service is temporarily unavailable. |