Available with: All-In-One and Fundamentals Data Feed packages.
Consumption: Each request consumes 10 API calls.

For Historical Market Capitalization data API, we cover all US stocks traded on NYSE/NASDAQ from 2017, and soon we will start to cover cryptocurrencies with historical market capitalization.

Register & Get Data

Quick Start

To get historical market capitalization data use the following URL:

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

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

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

url <- 'https://eodhd.com/api/historical-market-cap/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")
}
  • AAPL.US is the ticker code and it consists of two parts: {SYMBOL_NAME}.{EXCHANGE_ID}, you can use a US ticker code with or without the exchange part (AAPL or AAPL.US).
  • api_token – your own API KEY, which you will get after you subscribe to our services.
  • from and to – the format is ‘YYYY-MM-DD’. If you need data from Jan 5, 2017, to Feb 10, 2017, you should use from=2017-01-05 and to=2017-02-10.

For testing purposes you can try the following API Key (works only for AAPL.US ticker):  demo:

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

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

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

url <- 'https://eodhd.com/api/historical-market-cap/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")
}

As a result, you will get the following data in JSON format, please note the market capitalization is provided with a weekly period, not daily:

We have API limits 100 000 requests per day. Each symbol request costs 10 API calls. This API is available under the Fundamental and/or All-In-One package.

Register & Get Data