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

> Query trading session information for a specified market, including opening time, closing time, etc.

## Notes

* Market code is case-insensitive
* All returned times are in the **local timezone** of each market

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

## Response Fields

| Field             | Description                                                                               |
| ----------------- | ----------------------------------------------------------------------------------------- |
| market            | Market (US - US Stock Market, HK - Hong Kong Stock Exchange, CN - A-Share Market)         |
| trading\_sessions | Trading sessions array                                                                    |
| └─ begin\_time    | Trading start time, format: hhmm, e.g., 900                                               |
| └─ end\_time      | Trading end time, format: hhmm, e.g., 1400                                                |
| └─ trade\_session | Trading session type (0 - Normal Trading, 1 - Pre-Market, 2 - After-Hours, 3 - Overnight) |


## OpenAPI

````yaml GET /v1/market/trading-sessions
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/trading-sessions:
    get:
      summary: Trading Sessions
      description: Get trading session information for a specific market
      parameters:
        - name: market
          in: query
          required: true
          description: Market code (US, HK, CN)
          schema:
            type: string
            enum:
              - US
              - HK
              - CN
            default: US
            example: US
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    example: 0
                  message:
                    type: string
                    example: success
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        market:
                          type: string
                        trading_sessions:
                          type: array
                          items:
                            type: object
                            properties:
                              begin_time:
                                type: integer
                              end_time:
                                type: integer
                              trade_session:
                                type: integer
                    example:
                      - market: US
                        trading_sessions:
                          - begin_time: 400
                            end_time: 930
                            trade_session: 1
                          - begin_time: 930
                            end_time: 1600
                          - begin_time: 1600
                            end_time: 2000
                            trade_session: 2
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````