Alternatively, you can get the same list with Exchange API and the virtual code โ€œFOREXโ€.

We support more than 1100 forex pairs, below you can find a list of all these currency pairs. Itโ€™s easy to use; just add โ€˜FOREXโ€™ postfix to any currency pair. Our example key works for EUR.FOREX currency pair. For example, historical data end of day data for USD-EURO:

Sign up & Get Data

URL
cURL
PHP
Python
R
Chat GPT
https://eodhd.com/api/eod/EUR.FOREX?order=d&api_token=demo&fmt=json
curl --location "https://eodhd.com/api/eod/EUR.FOREX?order=d&api_token=demo&fmt=json"
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/eod/EUR.FOREX?order=d&api_token=demo&fmt=json',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
));

$data = curl_exec($curl);
curl_close($curl);

try {
    $data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
    var_dump($data);
} catch (Exception $e) {
    echo 'Error. '.$e->getMessage();
}
import requests

url = f'https://eodhd.com/api/eod/EUR.FOREX?order=d&api_token=demo&fmt=json'
data = requests.get(url).json()

print(data)
library(httr)
library(jsonlite)

url <- 'https://eodhd.com/api/eod/EUR.FOREX?order=d&api_token=demo&fmt=json'
response <- GET(url)

if (http_type(response) == "application/json") {
    content <- content(response, "text", encoding = "UTF-8")
    cat(content)
} else {
    cat("Error while receiving data\n")
}
New to coding? Our ChatGPT assistant can generate code in any language tailored to our API. Simply describe how you want to use our data, and get a working piece of code. Donโ€™t forget to replace the API token with your own.

Try it now (it's free)!

And if you want to get real-time data for USD-EURO:

URL
cURL
PHP
Python
R
Chat GPT
https://eodhd.com/api/real-time/EUR.FOREX?api_token=demo&fmt=json
curl --location "https://eodhd.com/api/real-time/EUR.FOREX?api_token=demo&fmt=json"
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/real-time/EUR.FOREX?api_token=demo&fmt=json',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'GET',
));

$data = curl_exec($curl);
curl_close($curl);

try {
    $data = json_decode($data, true, 512, JSON_THROW_ON_ERROR);
    var_dump($data);
} catch (Exception $e) {
    echo 'Error. '.$e->getMessage();
}
import requests

url = f'https://eodhd.com/api/real-time/EUR.FOREX?api_token=demo&fmt=json'
data = requests.get(url).json()

print(data)
library(httr)
library(jsonlite)

url <- 'https://eodhd.com/api/real-time/EUR.FOREX?api_token=demo&fmt=json'
response <- GET(url)

if (http_type(response) == "application/json") {
    content <- content(response, "text", encoding = "UTF-8")
    cat(content)
} else {
    cat("Error while receiving data\n")
}
New to coding? Our ChatGPT assistant can generate code in any language tailored to our API. Simply describe how you want to use our data, and get a working piece of code. Donโ€™t forget to replace the API token with your own.

Try it now (it's free)!

Sign up & Get Data