> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tickdb.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# 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.

## Notes

* Date format must be YYYYMMDD (e.g., 20260201)
* Returned trading days exclude weekends and holidays
* Market code is case-insensitive

## Supported Markets

* **US** - US Stock Market
* **HK** - Hong Kong Stock Exchange
* **CN** - A-Share Market

## Request Parameters

| Parameter | Required | Description                      |
| --------- | -------- | -------------------------------- |
| market    | Yes      | Market code, options: US, HK, CN |
| beg\_day  | Yes      | Start date, format: YYYYMMDD     |
| end\_day  | Yes      | End date, format: YYYYMMDD       |

## 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 |


## OpenAPI

````yaml GET /v1/market/trade-days
openapi: 3.0.0
info:
  title: TickDB API
  description: >-
    Unified real-time market data API — one connection for Forex, indices, US
    stocks, HK stocks, A-shares, and Crypto via REST and WebSocket.
  version: 1.0.1
  contact:
    email: support@tickdb.ai
servers:
  - url: https://api.tickdb.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v1/market/trade-days:
    get:
      summary: Trading Days
      description: Get trading days for a specific market within a date range
      parameters:
        - name: market
          in: query
          required: true
          description: Market code (US, HK, CN)
          schema:
            type: string
            enum:
              - US
              - HK
              - CN
            default: US
            example: US
        - name: beg_day
          in: query
          required: true
          description: Start date (format YYYYMMDD)
          schema:
            type: string
            default: '20260201'
            example: '20260201'
        - name: end_day
          in: query
          required: true
          description: End date (format YYYYMMDD)
          schema:
            type: string
            default: '20260228'
            example: '20260228'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      market:
                        type: string
                      trade_days:
                        type: array
                        items:
                          type: string
                      half_trade_days:
                        type: array
                        items:
                          type: string
                    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: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````