Get Exchange Details and Trading Hours

EODHD provides two versions of the Exchange Details endpoint. The v2 endpoint is recommended for all new integrations — it returns verified data for 73 exchanges, including extended trading sessions, lunch breaks, early close days, and a complete holiday calendar.

v2: List Available Exchanges

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

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

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

url <- 'https://eodhd.com/api/v2/exchange-details?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")
}
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)

Returns an array of all exchange codes supported by the v2 endpoint. Use these codes to request details for a specific exchange.

{
  "data": [
    "ASEX", "BMEX", "BVMF", "LSE", "NEO", "NILX",
    "ROCO", "TO", "US", "XAMS", "XASX", "XHKG",
    "XKRX", "XNSE", "XPAR", "XTKS", "..."
  ]
}

v2: Get Exchange Details

URL
cURL
PHP
Python
R
Chat GPT
https://eodhd.com/api/v2/exchange-details/US?api_token={YOUR_API_TOKEN}
curl --location "https://eodhd.com/api/v2/exchange-details/US?api_token={YOUR_API_TOKEN}&fmt=json"
$curl = curl_init();

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

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

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

Returns trading hours, extended sessions, and the full holiday calendar for the requested exchange. The code parameter is case-insensitive.

v2: Response Fields

FieldTypeDescription
NamestringFull exchange name
CodestringExchange code used in this endpoint
TimezonestringIANA timezone (e.g. America/New_York)
TradingHours.OpenstringRegular session open time (HH:MM:SS)
TradingHours.ClosestringRegular session close time (HH:MM:SS)
TradingHours.WorkingDaysstringTrading days (e.g. Mon, Tue, Wed, Thu, Fri)
TradingHours.PreMarketOpenstringPre-market session open (if available)
TradingHours.PreMarketClosestringPre-market session close (if available)
TradingHours.AfterHoursOpenstringAfter-hours session open (if available)
TradingHours.AfterHoursClosestringAfter-hours session close (if available)
TradingHours.LunchBreakStartstringLunch break start (if applicable)
TradingHours.LunchBreakEndstringLunch break end (if applicable)
ExchangeHolidaysobjectHoliday calendar keyed by date (YYYY-MM-DD)
ExchangeHolidays.*.HolidaystringHoliday name
ExchangeHolidays.*.TypestringOfficial, Bank, or EarlyClose
ExchangeHolidays.*.EarlyClosestringEarly close time (only for EarlyClose type)

Session fields (PreMarketOpen, AfterHoursOpen, LunchBreakStart, etc.) are only present when the exchange has that session. For example, US exchanges include pre-market and after-hours, Hong Kong and Tokyo include a lunch break.

v2 Example: US Exchange (Pre-Market and After-Hours)

{
  "data": {
    "Name": "NYSE / NASDAQ",
    "Code": "US",
    "Timezone": "America/New_York",
    "TradingHours": {
      "Open": "09:30:00",
      "Close": "16:00:00",
      "WorkingDays": "Mon, Tue, Wed, Thu, Fri",
      "PreMarketOpen": "04:00:00",
      "PreMarketClose": "09:30:00",
      "AfterHoursOpen": "16:00:00",
      "AfterHoursClose": "20:00:00"
    },
    "ExchangeHolidays": {
      "2026-01-01": {
        "Holiday": "New Year's Day",
        "Type": "Official"
      },
      "2026-11-27": {
        "Holiday": "Day after Thanksgiving",
        "Type": "EarlyClose",
        "EarlyClose": "13:00:00"
      },
      "2026-12-24": {
        "Holiday": "Christmas Eve",
        "Type": "EarlyClose",
        "EarlyClose": "13:00:00"
      },
      "2026-12-25": {
        "Holiday": "Christmas Day",
        "Type": "Official"
      }
    }
  }
}

v2 Example: Hong Kong Exchange (Lunch Break and Early Close)

{
  "data": {
    "Name": "Hong Kong Stock Exchange",
    "Code": "XHKG",
    "Timezone": "Asia/Hong_Kong",
    "TradingHours": {
      "Open": "09:30:00",
      "Close": "16:00:00",
      "WorkingDays": "Mon, Tue, Wed, Thu, Fri",
      "LunchBreakStart": "12:00:00",
      "LunchBreakEnd": "13:00:00"
    },
    "ExchangeHolidays": {
      "2026-02-16": {
        "Holiday": "Lunar New Year's Eve",
        "Type": "EarlyClose",
        "EarlyClose": "12:00:00"
      },
      "2026-02-17": {
        "Holiday": "Lunar New Year",
        "Type": "Official"
      },
      "2026-07-01": {
        "Holiday": "HKSAR Establishment Day",
        "Type": "Official"
      },
      "2026-12-25": {
        "Holiday": "Christmas Day",
        "Type": "Official"
      }
    }
  }
}

What v2 Adds Over v1

  • Pre-market and after-hours sessions – available for US and other supported exchanges
  • Lunch breaks – for exchanges that halt midday (Hong Kong, Tokyo, Shanghai, and others)
  • Early close days – exact close time on shortened trading days (e.g. Christmas Eve at 13:00)
  • Verified holiday calendars – complete and manually verified for all 73 exchanges
  • Correct timezones – IANA format for all exchanges

v1: Legacy Endpoint

The v1 endpoint remains available for backward compatibility. It covers all exchanges supported by EODHD and includes real-time status fields not available in v2.

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

curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://eodhd.com/api/exchange-details/{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-details/{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-details/{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")
}
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)

Use the exchange codes from the Exchanges API List endpoint. The v1 response includes:

  • Timezone – the timezone of the exchange
  • isOpen – boolean value indicating if the exchange is open right now or closed
  • TradingHours – open and close times with working days in the exchange timezone, may include lunch hours
  • ActiveTickers – tickers with any activity for the past two months
  • UpdatedTickers – tickers updated for the current day
{
  "Name": "USA Stocks",
  "Code": "US",
  "OperatingMIC": "XNAS, XNYS, OTCM, XCBO",
  "Country": "USA",
  "Currency": "USD",
  "Timezone": "America/New_York",
  "isOpen": true,
  "TradingHours": {
    "Open": "09:30:00",
    "Close": "16:00:00",
    "OpenUTC": "13:30:00",
    "CloseUTC": "20:00:00",
    "WorkingDays": "Mon,Tue,Wed,Thu,Fri"
  },
  "ActiveTickers": 52334,
  "UpdatedTickers": 0
}

Stock Market Holidays Data API

Holiday data is included in both v2 and v1 exchange details responses.

In v2, the full holiday calendar for the current year is always returned along with exchange details. No additional parameters are needed. Holidays are keyed by date and include a Type field (Official, Bank, or EarlyClose). The EarlyClose type also includes the exact early close time for that day.

In v1, holidays are part of the same exchange-details response and can be filtered with additional parameters:

  • from – the format is ‘YYYY-MM-DD’. The default value is 6 months before the current date.
  • to – the format is ‘YYYY-MM-DD’. The default value is 6 months after the current date.

The two versions use different response formats for holidays:

// v2 format – keyed by date, includes EarlyClose type
"ExchangeHolidays": {
  "2026-01-01": {
    "Holiday": "New Year's Day",
    "Type": "Official"
  },
  "2026-12-24": {
    "Holiday": "Christmas Eve",
    "Type": "EarlyClose",
    "EarlyClose": "13:00:00"
  }
}

// v1 format – indexed array with Date field
"ExchangeHolidays": {
  "0": {
    "Holiday": "New Year's Day",
    "Date": "2026-01-01",
    "Type": "official"
  }
}

And do not forget to check our Exchanges API and Symbol Change History API.

Sign up & Get Data