Welcome to EODHD! We specialize in providing extensive financial data through our APIs. With our services, you can seamlessly integrate a wide range of financial data into your projects, including end-of-day (EOD), real-time, intraday, and historical data for stocks, ETFs, funds, indices, futures, bonds, options, forex pairs, and alternative currencies, across various programming languages.

Our API is designed to be user-friendly, and to further simplify the development process, we offer libraries for the most popular programming languages, including PHP, C#, and R, among others. You can find these libraries here and also follow us on GitHub for updates.

Let’s start a quick tour through our most popular API endpoints and useful widgets. All examples we provide are in JSON format, and we highly recommend installing the JSON Viewer Plugin for Chrome before testing API requests in your browser. It will ensure that all returned data appears well-structured and easier to read.

Stock Prices and more in Excel and Google Sheets

If you are not a developer but still in need of data such as stock prices, end-of-day (with charts), intraday, and fundamental data API, among others, we recommend you try our Excel and Google Sheets add-ins. They are free for demo purposes but require quick registration on our EODHD to obtain a free API key.

Register & Get Data

Financial Data API examples

Let’s begin testing our API with some of the most common requests, which you can try out directly in your browser.

Using our Exchanges and Get List of Tickers API, here’s how to request a list of all supported exchanges along with their codes (please note that this specific API returns data only in JSON format):

URL
cURL
PHP
Python
R
https://eodhd.com/api/exchanges-list/?api_token={YOUR_API_TOKEN}&fmt=json
curl --location "https://eodhd.com/api/exchanges-list/?api_token={YOUR_API_TOKEN}&fmt=json"
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/exchanges-list/?api_token={YOUR_API_TOKEN}&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/exchanges-list/?api_token={YOUR_API_TOKEN}&fmt=json'
data = requests.get(url).json()

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

url <- 'https://eodhd.com/api/exchanges-list/?api_token={YOUR_API_TOKEN}&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")
}

Now, let’s retrieve the list of tickers per exchange. For the USA, the exchange code will be ‘US’. Please note that this API can return data in both CSV and JSON formats (using the parameter ‘&fmt’), with CSV being the default when no ‘&fmt’ is specified. In our case, we are expecting JSON:

URL
cURL
PHP
Python
R
https://eodhd.com/api/exchange-symbol-list/{EXCHANGE_CODE}?api_token={YOUR_API_TOKEN}&fmt=json
curl --location "https://eodhd.com/api/exchange-symbol-list/{EXCHANGE_CODE}?api_token={YOUR_API_TOKEN}&fmt=json"
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/exchange-symbol-list/{EXCHANGE_CODE}?api_token={YOUR_API_TOKEN}&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/exchange-symbol-list/{EXCHANGE_CODE}?api_token={YOUR_API_TOKEN}&fmt=json'
data = requests.get(url).json()

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

url <- 'https://eodhd.com/api/exchange-symbol-list/{EXCHANGE_CODE}?api_token={YOUR_API_TOKEN}&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")
}

To get End Of Day (EOD data) please use our End-Of-Day Historical Stock Market Data API:

URL
cURL
PHP
Python
R
https://eodhd.com/api/eod/AAPL.US?api_token=demo&fmt=json
curl --location "https://eodhd.com/api/eod/AAPL.US?api_token=demo&fmt=json"
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/eod/AAPL.US?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/AAPL.US?api_token=demo&fmt=json'
data = requests.get(url).json()

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

url <- 'https://eodhd.com/api/eod/AAPL.US?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")
}

To get Live/Delayed (15-minutes delayed data) please use our Live (Delayed) Stock Prices API:

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

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/real-time/AAPL.US?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/AAPL.US?api_token=demo&fmt=json'
data = requests.get(url).json()

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

url <- 'https://eodhd.com/api/real-time/AAPL.US?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")
}

To get Fundamental Data please use our Fundamental Data: Stocks, ETFs, Mutual Funds, Indices:

URL
cURL
PHP
Python
R
https://eodhd.com/api/fundamentals/AAPL.US?api_token=demo&fmt=json
curl --location "https://eodhd.com/api/fundamentals/AAPL.US?api_token=demo&fmt=json"
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/fundamentals/AAPL.US?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/fundamentals/AAPL.US?api_token=demo&fmt=json'
data = requests.get(url).json()

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

url <- 'https://eodhd.com/api/fundamentals/AAPL.US?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")
}

To get Intraday Data please use our Intraday Historical Data API:

URL
cURL
PHP
Python
R
https://eodhd.com/api/intraday/AAPL.US?api_token=demo&fmt=json
curl --location "https://eodhd.com/api/intraday/AAPL.US?api_token=demo&fmt=json"
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/intraday/AAPL.US?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/intraday/AAPL.US?api_token=demo&fmt=json'
data = requests.get(url).json()

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

url <- 'https://eodhd.com/api/intraday/AAPL.US?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")
}

To get Splits please use our Historical Splits and Dividends API:

URL
cURL
PHP
Python
R
https://eodhd.com/api/splits/AAPL.US?from=2000-01-01&api_token=demo&fmt=json
curl --location "https://eodhd.com/api/splits/AAPL.US?from=2000-01-01&api_token=demo&fmt=json"
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/splits/AAPL.US?from=2000-01-01&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/splits/AAPL.US?from=2000-01-01&api_token=demo&fmt=json'
data = requests.get(url).json()

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

url <- 'https://eodhd.com/api/splits/AAPL.US?from=2000-01-01&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")
}

To get Dividends please use our Historical Splits and Dividends API:

URL
cURL
PHP
Python
R
https://eodhd.com/api/div/AAPL.US?from=2000-01-01&api_token=demo&fmt=json
curl --location "https://eodhd.com/api/div/AAPL.US?from=2000-01-01&api_token=demo&fmt=json"
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/div/AAPL.US?from=2000-01-01&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/div/AAPL.US?from=2000-01-01&api_token=demo&fmt=json'
data = requests.get(url).json()

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

url <- 'https://eodhd.com/api/div/AAPL.US?from=2000-01-01&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")
}

To Search stocks and any other assets please use our Search API:

URL
cURL
PHP
Python
R
https://eodhd.com/api/search/{query_string}?api_token={YOUR_API_TOKEN}&fmt=json
curl --location "https://eodhd.com/api/search/{query_string}?api_token={YOUR_API_TOKEN}&fmt=json"
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/search/{query_string}?api_token={YOUR_API_TOKEN}&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/search/{query_string}?api_token={YOUR_API_TOKEN}&fmt=json'
data = requests.get(url).json()

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

url <- 'https://eodhd.com/api/search/{query_string}?api_token={YOUR_API_TOKEN}&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")
}

These are a few examples, but we recommend studying our documentation and exploring additional APIs for various types of data. We offer over 50 API endpoints and continually add new data sources, APIs, and applied libraries.

Register & Get Data

Documentation & useful articles

For detailed documentation, please visit our Documentation section. Feel free to use the Search feature to find information on specific topics.

Explore all the different ways you can make the most of our Financial Data API in our educational Academy section. This collection, gathered over several years from the insights of top traders, programmers, and market enthusiasts, offers articles on diverse trading strategies, analytical methods, and the application of AI in financial data analysis.

24/7 live support

One of our points of pride is our live support, which can not only advise you on any questions related to EODHD features and pricing plans but also resolve most technical issues while you’re online. You can contact support via the live chat in the lower right corner of every page on our site.