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

# 行情快照

> 獲取一個或多個交易品種的實時市場行情數據。

## 注意事項

* 最多可同時查詢 50 個交易品種
* 時間戳單位為毫秒（UTC）

## 支持的市場

**外匯**、**貴金屬**、**指數**、**美股**、**港股**、**A股**、**中國期貨**、**加密貨幣**

示例：

* 外匯：EURUSD、GBPUSD、USDJPY
* 貴金屬：XAUUSD、XAGUSD
* 指數：SPX、NDX、DJI
* 美股：AAPL.US、TSLA.US、MSFT.US
* 港股：700.HK、9988.HK、3690.HK
* A股：600519.SH、000001.SZ、920186.BJ
* 中國期貨：BU2609、IC2606、AP8888
* 加密貨幣：BTCUSDT、ETHUSDT、ADAUSDT

## 請求參數

| 參數名     | 是否必須 | 描述                                                                                                       |
| ------- | ---- | -------------------------------------------------------------------------------------------------------- |
| symbols | 是    | 交易產品代碼，多個用逗號分隔，最多50個                                                                                     |
| type    | 否    | 產品類型，可選。代碼無歧義時無需傳遞；若返回 `AMBIGUOUS_SYMBOL` 錯誤，按提示傳入對應值即可。可選值：`stock`、`indices`、`crypto`、`forex`、`futures` |

## 返回字段說明

| 字段                          | 說明            |
| --------------------------- | ------------- |
| symbol                      | 交易產品          |
| name                        | 產品名稱（如有）      |
| type                        | 產品類型          |
| last\_price                 | 最新成交價         |
| bid\_price                  | 最優買價（如有）      |
| ask\_price                  | 最優賣價（如有）      |
| volume\_24h                 | 24小時成交量       |
| high\_24h                   | 24小時最高價       |
| low\_24h                    | 24小時最低價       |
| price\_change\_24h          | 24小時價格變化      |
| price\_change\_percent\_24h | 24小時價格變化百分比   |
| timestamp                   | 數據時間戳（毫秒，UTC） |


## OpenAPI

````yaml GET /v1/market/ticker
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, China futures, and Crypto via REST and
    WebSocket.
  version: 1.0.2
  contact:
    email: support@tickdb.ai
servers:
  - url: https://api.tickdb.ai
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /v1/market/ticker:
    get:
      summary: Market Ticker
      description: Get real-time ticker snapshots for one or more symbols
      parameters:
        - name: symbols
          in: query
          required: true
          description: Comma-separated symbols (max 50)
          schema:
            type: string
            default: 700.HK,AAPL.US
            example: 700.HK,AAPL.US
        - name: type
          in: query
          required: false
          description: >-
            Symbol type, optional. Not required when the symbol is unambiguous;
            if the API returns an AMBIGUOUS_SYMBOL error, pass the value as
            indicated
          schema:
            type: string
            enum:
              - stock
              - indices
              - crypto
              - forex
              - futures
            example: stock
      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:
                        symbol:
                          type: string
                        name:
                          type: string
                        type:
                          type: string
                          enum:
                            - stock
                            - indices
                            - crypto
                            - forex
                            - futures
                        last_price:
                          type: string
                        bid_price:
                          type: string
                        ask_price:
                          type: string
                        volume_24h:
                          type: string
                        high_24h:
                          type: string
                        low_24h:
                          type: string
                        price_change_24h:
                          type: string
                        price_change_percent_24h:
                          type: string
                        timestamp:
                          type: integer
                    example:
                      - symbol: 700.HK
                        last_price: '543'
                        volume_24h: '11205874'
                        high_24h: '557'
                        low_24h: '543'
                        price_change_24h: '-9'
                        price_change_percent_24h: '-1.63'
                        timestamp: 1773292807000
                      - symbol: AAPL.US
                        last_price: '260.81'
                        volume_24h: '26218927'
                        high_24h: '262.13'
                        low_24h: '259.55'
                        price_change_24h: '-0.02'
                        price_change_percent_24h: '-0.01'
                        timestamp: 1773259201000
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````