Options Data for US Stocks: End-of-Day and Historical Learn more

Historical Market Capitalization (Marketcap) API

In plans: All-In-One and Fundamentals Data Feed plans
Each request consumes 10 API calls. ?
Resources: Coding Libraries

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

Sign up & Get Data

Quick Start

To get historical market capitalization data use the following URL:

https://eodhd.com/api/historical-market-cap/AAPL.US?api_token=demo&fmt=json
(Sign up for free to get an API token)
curl --location "https://eodhd.com/api/historical-market-cap/AAPL.US?api_token=demo&fmt=json"
(Sign up for free to get an API token)
$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();
}
(Sign up for free to get an API token)
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)
(Sign up for free to get an API token)
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")
}
(Sign up for free to get an API token)
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)!

How to use it (YouTube)

  • 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, 2020, to Feb 10, 2020, you should use from=2020-01-05 and to=2020-02-10.

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

https://eodhd.com/api/historical-market-cap/AAPL.US?api_token=demo&fmt=json
(Sign up for free to get an API token)
curl --location "https://eodhd.com/api/historical-market-cap/AAPL.US?api_token=demo&fmt=json"
(Sign up for free to get an API token)
$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();
}
(Sign up for free to get an API token)
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)
(Sign up for free to get an API token)
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")
}
(Sign up for free to get an API token)
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)!

How to use it (YouTube)

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.

Sign up & Get Data

Chat