Our Live OHLCV Stock Prices API supports a special parameter that lets you retrieve live data from all U.S. exchanges with a single request.
Use ex=US to fetch aggregated U.S. exchanges live data:
https://eodhd.com/api/real-time/AAPL.US?ex=US&api_token=demo&fmt=json
curl --location "https://eodhd.com/api/real-time/AAPL.US?ex=US&api_token=demo&fmt=json"
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://eodhd.com/api/real-time/AAPL.US?ex=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?ex=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?ex=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") }
Try it now (it's free)!
How to use it (YouTube)
Important: This request consumes as 100 API calls. More about API call limits here.