Trading Calendar
curl --request GET \
--url https://api.tickdb.ai/v1/market/trade-days \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/market/trade-days"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.tickdb.ai/v1/market/trade-days', 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.tickdb.ai/v1/market/trade-days",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-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.tickdb.ai/v1/market/trade-days"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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.tickdb.ai/v1/market/trade-days")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/market/trade-days")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": 0,
"data": {
"market": "US",
"trade_days": [
"20260202",
"20260203",
"20260204",
"20260205",
"20260206",
"20260209",
"20260210",
"20260211",
"20260212",
"20260213",
"20260217",
"20260218",
"20260219",
"20260220",
"20260223",
"20260224",
"20260225",
"20260226",
"20260227"
],
"half_trade_days": []
}
}Market Information
Trading Calendar
Query the list of trading days for a specified market within a specific time range, used to determine if a particular day is a trading day.
GET
/
v1
/
market
/
trade-days
Trading Calendar
curl --request GET \
--url https://api.tickdb.ai/v1/market/trade-days \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/market/trade-days"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.tickdb.ai/v1/market/trade-days', 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.tickdb.ai/v1/market/trade-days",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-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.tickdb.ai/v1/market/trade-days"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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.tickdb.ai/v1/market/trade-days")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/market/trade-days")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"code": 0,
"data": {
"market": "US",
"trade_days": [
"20260202",
"20260203",
"20260204",
"20260205",
"20260206",
"20260209",
"20260210",
"20260211",
"20260212",
"20260213",
"20260217",
"20260218",
"20260219",
"20260220",
"20260223",
"20260224",
"20260225",
"20260226",
"20260227"
],
"half_trade_days": []
}
}Plan Access
| Plan | Available |
|---|---|
| Free | ✅ |
| Starter | ✅ |
| Professional | ✅ |
| Full-Market Plans (A-Shares, HK Stocks, US Stocks) | ✅ |
| Enterprise | ✅ |
Notes
- Date format must be YYYYMMDD (e.g., 20260201)
- A single query can cover no more than 31 days
- The start date must be within the most recent year
- Returned trading days exclude weekends and holidays
- Market code is case-insensitive
Supported Markets
| Market | Examples |
|---|---|
| US Stocks | US |
| HK Stocks | HK |
| A-Shares | CN |
Request Parameters
| Parameter | Required | Description |
|---|---|---|
| market | Yes | Market code: US, HK, or CN |
| beg_day | Yes | Start date in YYYYMMDD format; must be within the most recent year |
| end_day | Yes | End date in YYYYMMDD format; the range from the start date cannot exceed 31 days |
Response Fields
| Field | Description |
|---|---|
| market | Market code |
| trade_days | Full trading days list, using YYYYMMDD format |
| half_trade_days | Half trading days list (half-day trading only), using YYYYMMDD format |
Authorizations
Query Parameters
Market code: US, HK, or CN
Available options:
US, HK, CN Example:
"US"
Start date in YYYYMMDD format; must be within the most recent year
Pattern:
^[0-9]{8}$Example:
"20260201"
End date in YYYYMMDD format; the range from the start date cannot exceed 31 days
Pattern:
^[0-9]{8}$Example:
"20260228"
Response
200 - application/json
Successful response.
Example:
0
Show child attributes
Show child attributes
Example:
{
"market": "US",
"trade_days": [
"20260202",
"20260203",
"20260204",
"20260205",
"20260206",
"20260209",
"20260210",
"20260211",
"20260212",
"20260213",
"20260217",
"20260218",
"20260219",
"20260220",
"20260223",
"20260224",
"20260225",
"20260226",
"20260227"
],
"half_trade_days": []
}
