Market Status
curl --request GET \
--url https://api.tickdb.ai/v1/fundamentals/market/status \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/fundamentals/market/status"
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/fundamentals/market/status', 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/fundamentals/market/status",
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/fundamentals/market/status"
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/fundamentals/market/status")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/fundamentals/market/status")
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": {
"markets": [
{
"market": "US",
"market_time": "2023-11-07T05:31:56Z",
"trade_status": 123
}
]
}
}Market Information
Market Status
Query the current trading phase and market time for each market.
GET
/
v1
/
fundamentals
/
market
/
status
Market Status
curl --request GET \
--url https://api.tickdb.ai/v1/fundamentals/market/status \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.tickdb.ai/v1/fundamentals/market/status"
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/fundamentals/market/status', 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/fundamentals/market/status",
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/fundamentals/market/status"
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/fundamentals/market/status")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tickdb.ai/v1/fundamentals/market/status")
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": {
"markets": [
{
"market": "US",
"market_time": "2023-11-07T05:31:56Z",
"trade_status": 123
}
]
}
}Plan Access
| Plan | Available |
|---|---|
| Free | ❌ |
| Starter | ✅ |
| Professional | ✅ |
| Full-Market Plans (A-Shares, HK Stocks, US Stocks) | ✅ |
| Enterprise | ✅ |
Notes
- This is a global endpoint and does not accept
marketorsymbol; status changes with the trading session.
Supported Markets
| Market | Examples |
|---|---|
| US Stocks | US |
| HK Stocks | HK |
| A-Shares | CN |
Request Parameters
This endpoint does not require query parameters.Request Example
curl -H "X-API-Key: YOUR_API_KEY" \
"https://api.tickdb.ai/v1/fundamentals/market/status"
Response Fields
The table below lists fields indata; an outer code=0 indicates success.
| Field | Description |
|---|---|
| markets | Trading status list for each market. |
| └─ market | Market code. |
| └─ market_time | Current market time as an RFC 3339 date-time string with a time-zone offset. |
| └─ trade_status | Trading-status code. |
CN, HK, and US.
trade_status Codes
Each market returns only the statuses that apply to it. Common and special trading-phase codes are listed below:
| Market | Code | Meaning |
|---|---|---|
| CN, HK | 101 | Pre-open clearing |
| CN, HK | 102 | Opening auction |
| CN, HK | 105 | Regular trading |
| CN, HK | 106 | Midday break |
| CN, HK | 107 | Closing auction |
| CN, HK | 108 | Market closed |
| CN | 120 | After-hours fixed-price trading |
| CN, HK | 121 | Half-day market closed |
| CN, HK | 122 | Not yet opened under special conditions |
| CN, HK | 123 | Temporary intraday break |
| US | 201 | Pre-market trading |
| US | 202 | Regular trading |
| US | 203 | Post-market trading |
| US | 204 | Market closed |
| US | 205 | Trading halted |
| US | 206 | Pre-open clearing and pre-market session |
| US | 207 | Overnight trading |
| US | 209 | Pre-market clearing |
| US | 210 | Post-market clearing |
