Currency API
for foreign exchange rates and currency conversion

A simple, reliable and real-time currency exchange API for current and historical forex rates.
Try for free!
Features
Live Rates on 152 currencies
Get real-time accurate rates on over 152 currencies, cryptocurrencies and precious metals.
Rates are updated every 60 seconds.
- {
- "base": "USD"
- "rates": {
- "CAD": 1.260046
- "EUR": 0.806942
- "GBP": 0.719154
- [+ 149 more]
- }
- }
Historical Data
History is important, so we store currency data from as far back as the year 2000.
Passing the date as a parameter, you can find all currency rates for a particular day.
With our timeframe endpoint, you can select a start and end date to get multiple currencies rates for each day.
More than just physical currencies
We supply a range of popular cryptocurrencies including:
Bitcoin (BTC)
Litecoin (LTC)
Ethereum (ETH)
Ripple (XRP)
Bitcoin Cash (BCH) and more!
Unlimited Requests
Staying up to date is important, so we offer plans that give you freedom.
Our plans offer a range from 1,250 API calls to unlimited, so you can select the best option for your project.
If your business requires a custom plan, feel free to get in touch.
More Features
Delivered in JSON or XML
Our endpoints return either JSON or XML. Keeping it simple and easy to work with.
Convert on the fly
Send values and currencies to our Covert endpoint, and we supply the results.
API key authentication
Our 36 character API keys ensure your account is kept safe. Just pass it as a parameter. Simple
Limit your request
You may not always need each conversion rate. Limit what's returned with our limit parameter.
Clear documentation
Our documentation is second to none. Follow along to see how easy we've made it.
Support
Our support team are here to help. So if you need any help setting up, drop us a line.
How does it work?
Try one of our packages/collections
Or do it your way
$apiKey = 'YOUR_API_KEY';
$baseCurrency = 'USD';
$url = 'https://currencyapi.net/api/v1/rates?key='.$apiKey.'&base='.$baseCurrency;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$jsonResponse = curl_exec($ch);
curl_close($ch);
$objResponse = json_decode($jsonResponse);
echo "1 " . $baseCurrency . " is " . $objResponse->rates->EUR . " Euros";
/* Outputs 1 USD is 0.806942 Euros */
import requests import json apiKey = 'YOUR_API_KEY' baseCurrency = 'USD' url = 'https://currencyapi.net/api/v1/rates?key='+apiKey+'&base='+baseCurrency r = requests.get(url) response = r.json() print('1 ' + baseCurrency + ' is', response['rates']['EUR'], 'Euros') #python 3.x /* Outputs 1 USD is 0.806942 Euros */
const fetch = require('node-fetch');
let apiKey = 'YOUR_API_KEY';
let baseCurrency = 'USD'
let url = 'https://currencyapi.net/api/v1/rates?key='+apiKey+'&base='+baseCurrency;
const res = await fetch(url);
const data = await res.json();
console.log('1 ' + baseCurrency + ' is ' + data.rates.EUR + ' Euros');
/* Outputs 1 USD is 0.806942 Euros */
require 'faraday'
require 'json'
apiKey = 'YOUR_API_KEY';
baseCurrency = 'USD'
url = 'https://currencyapi.net/api/v1/rates?key='+apiKey+'&base='+baseCurrency;
res = Faraday.get(url)
data = JSON.parse(res.body)
puts '1 ' + baseCurrency + ' is ' + data['rates']['EUR'].to_s + ' Euros'
/* Outputs 1 USD is 0.806942 Euros */
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.ProtocolException;
import java.net.URL;
public static void currency_api() throws IOException {
String apiKey = 'YOUR_API_KEY';
String baseCurrency = 'USD'
String url = "https://currencyapi.net/api/v1/rates?key=" + apiKey + "&base="+baseCurrency;
URL urlForGetRequest = new URL(url);
String readLine = null;
HttpURLConnection connection = (HttpURLConnection) urlForGetRequest.openConnection();
connection.setRequestMethod("GET");
int responseCode = connection.getResponseCode();
if (responseCode == HttpURLConnection.HTTP_OK) {
BufferedReader in = new BufferedReader(
new InputStreamReader(connection.getInputStream()));
StringBuffer response = new StringBuffer();
while ((readLine = in .readLine()) != null) {
response.append(readLine);
} in .close();
System.out.println("1 " + baseCurrency + " is " + response.toString().rates."EUR" + ' Euros');
}
}
/* Outputs 1 USD is 0.806942 Euros */
import (
"io/ioutil"
"log"
"net/http"
)
var apiKey = "YOUR_API_KEY";
var baseCurrency = "USD"
var url = "https://currencyapi.net/api/v1/rates?key=" + apiKey + "&base="+baseCurrency;
resp, err := http.Get(url)
if err!= nil{
log.Fatalln(err)
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err!= nil{
log.Fatalln(err)
}
fmt.Println("1 " + baseCurrency + " is " + string(body)["rates"]["EUR"] + " Euros")
/* Outputs 1 USD is 0.806942 Euros */
String apiKey = 'YOUR_API_KEY';
String baseCurrency = 'USD'
String url = "https://currencyapi.net/api/v1/rates?key=" + apiKey + "&base="+baseCurrency;
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
using(HttpWebResponse response = (HttpWebResponse)request.GetResponse())
using(Stream stream = response.GetResponseStream())
using(StreamReader reader = new StreamReader(stream))
{
Console.WritLine("1 " + baseCurrency + " is " + reader.ReadToEnd()["rates"]["EUR"] + " Euros");
}
Console.ReadLine();
/* Outputs 1 USD is 0.806942 Euros */
Pricing
Recommended
Essential
$ 9.99 8.99 7.99 99.99 89.99 79.99 p/m
Features:
- Updated every 60 minutes
- 12,500 monthly requests
- Change base currency
- Secured using HTTPS
- Top notch support
- Commercial use
Endpoints:
Rates | |
---|---|
Convert | |
Get this
Recommended
StartUp
$ 34.99 30.99 26.99 349.99 309.99 269.99 p/m
Features:
- Updated every 10 minutes
- 125,000 monthly requests
- Change base currency
- Secured using HTTPS
- Top notch support
- Commercial use
Endpoints:
Rates | |
---|---|
Convert | |
History | |
Get this
Recommended
Professional
$ 74.99 64.99 56.99 749.99 649.99 569.99 p/m
Features:
- Updated every 60 seconds!
- Unlimited monthly requests
- Change base currency
- Secured using HTTPS
- Top notch support
- Commercial use
Endpoints:
Rates | |
---|---|
Convert | |
History | |
Timeframe |
Get this
Try us for free
No commercial use allowed on this plan
- Only 1,250 monthly requests
- Fixed base currency (USD)
- Only unsecure HTTP
- Updated hourly
- No support
Rates | |
---|---|
Convert | |
History | |
Timeframe |