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

# Market Metrics

> Retrieve comprehensive market metrics for stocks, including market statistics, valuation indicators, capital flow, and derivatives-related indicators.

## Supported Markets

**US Stocks**, **HK Stocks**, **A-Shares**

Examples:

* US Stocks: AAPL.US, TSLA.US, MSFT.US
* HK Stocks: 700.HK, 9988.HK, 3690.HK
* A-Shares: 000001.SH, 000001.SZ

## Request Parameters

| Parameter | Required | Description                                                                                                                                                                                    |
| --------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| symbols   | Yes      | Stock symbol codes, comma-separated, max 50                                                                                                                                                    |
| type      | No       | Symbol type, optional. Not required when the symbol is unambiguous; if the API returns an `AMBIGUOUS_SYMBOL` error, pass the value as indicated. Values: `stock`, `indices`, `crypto`, `forex` |

## Response Fields

| Field Name                  | Description           |
| --------------------------- | --------------------- |
| symbol                      | Trading Symbol        |
| last\_done                  | Last Price            |
| change\_val                 | Change Value          |
| change\_rate                | Change Rate           |
| volume                      | Volume                |
| turnover                    | Turnover              |
| ytd\_change\_rate           | YTD Change Rate       |
| turnover\_rate              | Turnover Rate         |
| total\_market\_value        | Total Market Value    |
| capital\_flow               | Capital Flow          |
| amplitude                   | Amplitude             |
| volume\_ratio               | Volume Ratio          |
| pe\_ttm\_ratio              | P/E Ratio (TTM)       |
| pb\_ratio                   | P/B Ratio             |
| dividend\_ratio\_ttm        | Dividend Yield (TTM)  |
| five\_day\_change\_rate     | 5-Day Change Rate     |
| ten\_day\_change\_rate      | 10-Day Change Rate    |
| half\_year\_change\_rate    | Half-Year Change Rate |
| five\_minutes\_change\_rate | 5-Minute Change Rate  |

## Notes

* Metrics data is calculated based on real-time quotes and historical data


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

````