Check if a date is a trading day
curl --request GET \
--url https://api.reportify.cn/v1/quant/quotes/calendar/check \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reportify.cn/v1/quant/quotes/calendar/check"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reportify.cn/v1/quant/quotes/calendar/check', 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.reportify.cn/v1/quant/quotes/calendar/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.reportify.cn/v1/quant/quotes/calendar/check"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.reportify.cn/v1/quant/quotes/calendar/check")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/quant/quotes/calendar/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"datas": [
{}
],
"metadata": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}行情数据
交易日判断
判断某一天是否为交易日,并返回上一/下一交易日
GET
/
v1
/
quant
/
quotes
/
calendar
/
check
Check if a date is a trading day
curl --request GET \
--url https://api.reportify.cn/v1/quant/quotes/calendar/check \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.reportify.cn/v1/quant/quotes/calendar/check"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.reportify.cn/v1/quant/quotes/calendar/check', 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.reportify.cn/v1/quant/quotes/calendar/check",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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.reportify.cn/v1/quant/quotes/calendar/check"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.reportify.cn/v1/quant/quotes/calendar/check")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reportify.cn/v1/quant/quotes/calendar/check")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"datas": [
{}
],
"metadata": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}判断指定日期是否为交易日,并返回相对该日期的上一交易日和下一交易日(均为严格的前/后一个交易日)。
支持的市场:
cn(A 股,含 sh/sz/bj)、hk(港股)、us(美股)。global 无日历源,传入会返回错误。curl "https://api.reportify.cn/v1/quant/quotes/calendar/check?target=2026-01-01" \
-H "Authorization: Bearer <token>"
import requests
response = requests.get(
"https://api.reportify.cn/v1/quant/quotes/calendar/check",
headers={"Authorization": "Bearer <token>"},
params={"target": "2026-01-01"}
)
print(response.json())
const response = await fetch(
'https://api.reportify.cn/v1/quant/quotes/calendar/check?target=2026-01-01',
{
headers: { 'Authorization': 'Bearer <token>' }
}
);
const data = await response.json();
请求参数
string
待判断日期(
YYYY-MM-DD),可选,默认今天string
default:"cn"
股票市场,可选
cn/hk/us(global 不支持)string
交易所。
cn:sh(上交所)/sz(深交所)/bj(北交所);hk:hk;us:us。不传时使用市场默认交易所(cn 为 sh)响应参数
array
object
查询元数据,包含
market、exchange、target响应示例
{
"datas": [
{
"date": "2026-01-01",
"is_trading_day": false,
"previous_trading_day": "2025-12-31",
"next_trading_day": "2026-01-05"
}
],
"metadata": {
"market": "cn",
"exchange": "sh",
"target": "2026-01-01"
}
}
Authorizations
Enter your Bearer token
Query Parameters
Stock market identifier
Available options:
cn, hk, us, global Exchange identifier (sh=上交所, sz=深交所, bj=北交所, hk=香港, us=美国)
Available options:
sh, sz, bj, hk, us Response
Successful Response
Trading calendar response.
