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

# 市場指標

> 獲取股票的綜合市場指標，包括行情統計、估值指標、資金流向以及衍生品相關指標。

## 套餐權限

| 套餐 | 可用 |
| - | :-: |
| 免費版 | ❌ |
| 基礎版 | ✅ |
| 專業版 | ✅ |
| 全量套餐（A 股、港股、美股） | ✅ |
| 企業版 | ✅ |

## 注意事項

* 指標數據基於實時行情和歷史數據計算

## 支持的市場

| 市場 | 示例 |
| - | - |
| 美股 | AAPL.US, TSLA.US, MSFT.US |
| 港股 | 700.HK, 9988.HK, 3690.HK |
| A股 | 600519.SH, 000001.SZ |

## 請求參數

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

## 返回字段說明

| 字段名 | 描述 |
| - | - |
| symbol | 交易品種代碼 |
| last\_done | 最新價 |
| change\_val | 漲跌額 |
| change\_rate | 漲跌幅 |
| volume | 成交量 |
| turnover | 成交額 |
| ytd\_change\_rate | 年初至今漲幅 |
| turnover\_rate | 換手率 |
| total\_market\_value | 總市值 |
| capital\_flow | 資金流向 |
| amplitude | 振幅 |
| volume\_ratio | 量比 |
| pe\_ttm\_ratio | 市盈率 (TTM) |
| pb\_ratio | 市淨率 |
| dividend\_ratio\_ttm | 股息率 (TTM) |
| five\_day\_change\_rate | 五日漲幅 |
| ten\_day\_change\_rate | 十日漲幅 |
| half\_year\_change\_rate | 半年漲幅 |
| five\_minutes\_change\_rate | 五分鐘漲幅 |


## OpenAPI

````yaml openapi.zh-Hant.yaml GET /v1/market/calc-index
openapi: 3.1.0
info:
  title: TickDB API
  description: TickDB 統一即時行情數據 API，提供 REST 和 WebSocket 接入。
  version: 1.0.3
  contact:
    email: support@tickdb.ai
servers:
  - url: https://api.tickdb.ai
    description: 正式環境
security:
  - ApiKeyAuth: []
paths:
  /v1/market/calc-index:
    get:
      summary: 市場指標
      description: 獲取股票的綜合市場指標，包括行情統計、估值指標、資金流向以及衍生品相關指標。
      parameters:
        - name: symbols
          in: query
          required: true
          description: 股票代碼，多個用逗號分隔，最多50個
          schema:
            type: string
            default: 700.HK
            example: 700.HK,AAPL.US
        - name: type
          in: query
          required: false
          description: >-
            產品類型，可選。代碼無歧義時無需傳遞；若返回 `AMBIGUOUS_SYMBOL`
            錯誤，按提示傳入對應值即可。可選值：`stock`、`indices`、`crypto`、`forex`
          schema:
            type: string
            enum:
              - stock
              - indices
              - crypto
              - forex
            example: stock
      responses:
        '200':
          description: 請求成功。
          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
                        last_done:
                          type: string
                        change_val:
                          type: string
                        change_rate:
                          type: string
                        volume:
                          type: string
                        turnover:
                          type: string
                        ytd_change_rate:
                          type: string
                        turnover_rate:
                          type: string
                        total_market_value:
                          type: string
                        capital_flow:
                          type: string
                        amplitude:
                          type: string
                        volume_ratio:
                          type: string
                        pe_ttm_ratio:
                          type: string
                        pb_ratio:
                          type: string
                        dividend_ratio_ttm:
                          type: string
                        five_day_change_rate:
                          type: string
                        ten_day_change_rate:
                          type: string
                        half_year_change_rate:
                          type: string
                        five_minutes_change_rate:
                          type: string
                    example:
                      - symbol: 700.HK
                        last_done: '547.5'
                        change_val: '-4.5'
                        change_rate: '-0.0082'
                        volume: '16521084'
                        turnover: '0.0018'
                        ytd_change_rate: '-0.086'
                        turnover_rate: '0.18'
                        total_market_value: '4985729978437.5'
                        capital_flow: '-277985600'
                        amplitude: '0.0281'
                        volume_ratio: '0.47'
                        pe_ttm_ratio: '20.89'
                        pb_ratio: '3.88'
                        dividend_ratio_ttm: '0.83'
                        five_day_change_rate: '0.0906'
                        ten_day_change_rate: '0.0693'
                        half_year_change_rate: '-0.1492'
                        five_minutes_change_rate: '0'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.