Market Holidays
curl --request GET \
--url https://api.tradewatch.io/stocks/markets/holidays \
--header 'api-key: <api-key>'import requests
url = "https://api.tradewatch.io/stocks/markets/holidays"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://api.tradewatch.io/stocks/markets/holidays', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tradewatch.io/stocks/markets/holidays",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tradewatch.io/stocks/markets/holidays"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tradewatch.io/stocks/markets/holidays")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tradewatch.io/stocks/markets/holidays")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"exchange": "New York Stock Exchange",
"flag": "πΊπΈ",
"mic": "XNYS",
"date": "2024-11-29",
"day_of_week": "Friday",
"is_weekend": false,
"is_business_day": true,
"holiday_name": "Black Friday",
"is_early_close": true,
"open_time": "2024-11-29T09:30:00-05:00",
"close_time": "2024-11-29T13:00:00-05:00"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Markets
Market Holidays
Get market holidays. It takes half-days into account.
GET
/
stocks
/
markets
/
holidays
Market Holidays
curl --request GET \
--url https://api.tradewatch.io/stocks/markets/holidays \
--header 'api-key: <api-key>'import requests
url = "https://api.tradewatch.io/stocks/markets/holidays"
headers = {"api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'api-key': '<api-key>'}};
fetch('https://api.tradewatch.io/stocks/markets/holidays', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tradewatch.io/stocks/markets/holidays",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.tradewatch.io/stocks/markets/holidays"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.tradewatch.io/stocks/markets/holidays")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tradewatch.io/stocks/markets/holidays")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body[
{
"exchange": "New York Stock Exchange",
"flag": "πΊπΈ",
"mic": "XNYS",
"date": "2024-11-29",
"day_of_week": "Friday",
"is_weekend": false,
"is_business_day": true,
"holiday_name": "Black Friday",
"is_early_close": true,
"open_time": "2024-11-29T09:30:00-05:00",
"close_time": "2024-11-29T13:00:00-05:00"
}
]{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Authentication via API key header
Query Parameters
Specify comma separated list of MIC codes for which market to show data for.
Show holidays starting at this date.
Show holidays until this date.
Response
Successful Response
Full name of the exchange
Example:
"New York Stock Exchange"
Country flag emoji
Example:
"πΊπΈ"
Market Identifier Code (ISO 10383)
Example:
"XNYS"
Date of the holiday (YYYY-MM-DD)
Example:
"2024-11-29"
Day of the week
Example:
"Friday"
Whether the holiday falls on a weekend
Example:
false
Whether the day is a business day
Example:
true
Name of the holiday
Example:
"Black Friday"
Whether the market closes early on this day
Example:
true
Opening time for the day
Example:
"2024-11-29T09:30:00-05:00"
Closing time for the day
Example:
"2024-11-29T13:00:00-05:00"
