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

# 价格快照

> 股票实时价格快照——包括当前价格、当日涨跌额和当日涨跌幅。

获取某个股票代码的实时股价快照。返回当前价格，以及相较前一交易日的变化值（绝对值和百分比）。

**最适合：** 实时价格组件、仪表板、根据盘中波动触发提醒、验证成交结果、交易前价格合理性检查。

## 示例

```bash theme={null}
curl -X GET "https://api.aisa.one/apis/v1/financial/prices/snapshot?ticker=AAPL" \
  -H "Authorization: Bearer $AISA_API_KEY"
```


## OpenAPI

````yaml openapi/zh/openapi-financial.json GET /prices/snapshot
openapi: 3.0.1
info:
  title: Financial Datasets API
  description: 股票市场 API，提供超过 30 年、涵盖 30,000 多个股票代码的实时和历史金融数据，包括财务报表、股票价格、内部人士交易、SEC 申报文件等。
  version: 1.0.0
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  contact:
    name: API Support
    url: https://financialdatasets.ai/support
    email: support@financialdatasets.ai
  termsOfService: https://financialdatasets.ai/terms
servers:
  - url: https://api.aisa.one/apis/v1/financial
    description: Production server
security:
  - bearerAuth: []
tags:
  - name: Financial Statements
    description: Access to income statements, balance sheets, and cash flow statements
  - name: Market Data
    description: Real-time and historical price data
  - name: Company Information
    description: Company facts like ticker, name, and description
  - name: Earnings
    description: Earnings press releases and related data
  - name: Crypto
    description: Cryptocurrency price data and market information
  - name: News
    description: Real-time and historical news articles
  - name: SEC Filings
    description: SEC filings and regulatory documents
  - name: Insider Trades
    description: Insider trading activity and transactions
  - name: Institutional Ownership
    description: Equity holdings of investment managers
  - name: Financial Metrics
    description: Financial ratios, metrics, and key performance indicators
paths:
  /prices/snapshot:
    get:
      tags:
        - Market Data
      summary: 价格快照（实时）
      description: 获取股票的实时报价快照，包括当前价格、当日涨跌额和当日涨跌幅。
      operationId: getPriceSnapshot
      parameters:
        - name: ticker
          in: query
          description: 股票代码（例如 AAPL、MSFT）。
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 价格快照响应
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PriceSnapshotResponse'
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '402':
          $ref: '#/components/responses/PaymentRequiredError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  schemas:
    PriceSnapshotResponse:
      type: object
      properties:
        snapshot:
          $ref: '#/components/schemas/PriceSnapshot'
    PriceSnapshot:
      type: object
      properties:
        price:
          type: number
          description: 股票的当前价格。
        ticker:
          type: string
          description: 股票代码。
        day_change:
          type: number
          description: 相较于前一交易日收盘价的价格变动。
        day_change_percent:
          type: number
          description: 自上一交易日收盘以来的价格变动百分比。
        market_cap:
          type: number
          description: 公司的市值。
        time:
          type: string
          description: 价格快照的 UTC 人类可读格式时间戳。
        time_milliseconds:
          type: number
          description: 价格快照的时间戳，以自纪元以来的毫秒数表示。
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: 简短的错误消息。
        message:
          type: string
          description: 更详细的错误消息。
  responses:
    BadRequestError:
      description: 错误请求
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Bad Request
            message: Invalid request parameters
    UnauthorizedError:
      description: 未授权
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Unauthorized
            message: Invalid API key provided
    PaymentRequiredError:
      description: 该请求需要付费订阅
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Payment Required
            message: >-
              This endpoint requires a paid subscription. Please upgrade your
              plan.
    NotFoundError:
      description: 未找到指定的资源
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error: Not Found
            message: Ticker XXXX not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````