> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reportify.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 实时行情

> 获取单只股票的实时行情数据

获取单只股票的实时行情数据，包含最新价、涨跌额、涨跌幅。

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://api.reportify.cn/v1/quant/quotes/realtime?symbol=000001" \
    -H "Authorization: Bearer <token>"
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.reportify.cn/v1/quant/quotes/realtime",
      headers={"Authorization": "Bearer <token>"},
      params={"symbol": "000001"}
  )
  print(response.json())
  ```

  ```typescript TypeScript theme={null}
  const response = await fetch(
    'https://api.reportify.cn/v1/quant/quotes/realtime?symbol=000001',
    {
      headers: { 'Authorization': 'Bearer <token>' }
    }
  );
  const data = await response.json();
  ```
</CodeGroup>

## 请求参数

<ParamField query="symbol" type="string" required>
  股票代码
</ParamField>

## 响应参数

<ResponseField name="datas" type="array">
  实时行情数据

  <Expandable title="数据字段">
    <ResponseField name="name" type="string">
      股票名称
    </ResponseField>

    <ResponseField name="price" type="number">
      最新价
    </ResponseField>

    <ResponseField name="change" type="number">
      涨跌额
    </ResponseField>

    <ResponseField name="change_percent" type="number">
      涨跌幅（%）
    </ResponseField>

    <ResponseField name="date" type="string">
      行情时间
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="metadata" type="object">
  查询元数据，包含 `symbol`
</ResponseField>

## 响应示例

```json theme={null}
{
  "datas": [
    {
      "name": "平安银行",
      "price": 11.0,
      "change": 0.05,
      "change_percent": 0.4566,
      "date": "2026-04-28T15:33:45+08:00"
    }
  ],
  "metadata": {
    "symbol": "000001"
  }
}
```


## OpenAPI

````yaml GET /v1/quant/quotes/realtime
openapi: 3.1.0
info:
  title: Reportify API
  version: 1.0.0
  description: API documentation for Reportify's document management and search services.
servers:
  - url: https://api.reportify.cn
    description: Production server
security:
  - BearerAuth: []
paths:
  /v1/quant/quotes/realtime:
    get:
      tags:
        - openapi-quant
      summary: Get realtime quote
      description: |
        Get realtime quote for a single symbol.

        - **symbol**: Stock code (required)
      operationId: quote_realtime
      parameters:
        - name: symbol
          in: query
          required: true
          schema:
            type: string
            title: Symbol
          description: Stock code
          example: '000001'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RealtimeOutput'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - BearerAuth: []
components:
  schemas:
    RealtimeOutput:
      type: object
      required:
        - datas
        - metadata
      properties:
        datas:
          type: array
          title: Datas
          description: Realtime quote data
          items:
            type: object
            properties:
              change_percent:
                type: number
                description: Price change percentage
              price:
                type: number
                description: Current price
              change:
                type: number
                description: Price change amount
              name:
                type: string
                description: Stock name
              date:
                type: string
                description: Quote timestamp
        metadata:
          type: object
          title: Metadata
          description: Query metadata
          additionalProperties: true
      title: RealtimeOutput
      description: Realtime quote response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Enter your Bearer token

````