> ## 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股：000001.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 GET /v1/market/calc-index
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/calc-index:
    get:
      summary: Market Metrics
      description: >-
        Retrieve comprehensive market metrics for stocks, including market
        statistics, valuation indicators, capital flow, and derivatives-related
        indicators
      parameters:
        - name: symbols
          in: query
          required: true
          description: Comma-separated stock symbols (max 50)
          schema:
            type: string
            default: 700.HK
            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
            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
                        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

````