Available with: All-In-One, EOD Historical Data — All World, EOD+Intraday — All World Extended and Free packages.
Consumption: Each request consumes 1 API call.
There is an special API for bulk splits and dividends download: https://eodhd.com/financial-apis/bulk-api-eod-splits-dividends/.
Historical Dividends API
To get dividends for any ticker to use the following URL:
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")
}
Let’s take a closer look at this URL and explain all parts in detail.
- AAPL.US consists of two parts: {SYMBOL_NAME}.{EXCHANGE_ID}, then you can use, for example, AAPL.MX for Mexican Stock Exchange. Or AAPL.US for NASDAQ. Check the list of supported exchanges to get more information about stock markets we do support.
- from – date from with format “Y-m-d”
- to – date to with format “Y-m-d”
- api_token – API Key, we will send you after you subscribe to our services.
If you skip “from” or “to” then you’ll get the maximum available data for the symbol. For testing purposes, you can try the following API Key (works only for AAPL.US ticker):Â demo
For dividends, we provide ex-dividend dates and values for almost all symbols we have in the database. For major US tickers from NYSE, NASDAQ, and major European companies we provide more information:
- Ex-dividend date
- Declaration date
- Record date
- Payment date
- Value
- Unadjusted Value
- Dividend currency
Please note, that the extended format with declaration date, record date, and the payment date is available only for major US tickers and only in JSON format.
Historical Splits API
To get splits for any tickers, you should use the following URL:
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")
}
- AAPL.US consists of two parts: {SYMBOL_NAME}.{EXCHANGE_ID}, then you can use, for example, AAPL.MX for Mexican Stock Exchange. Or AAPL.US for NASDAQ. Check the list of supported exchanges to get more information about stock markets we do support.
- from – date from with format “Y-m-d”
- to – date to with format “Y-m-d”
- api_token – API Key, we will send you after you subscribe to our services.
If you omit “from” or “to”, you will receive the entire period of the symbol. For testing purposes, you can try the following API key (works only for the ticker AAPL.US): demo
We have API limits 100 000 requests per day. Each symbol request costs 1 API call.
We hope this works for you! Enjoy!