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

# 获取最新参考行情

> 获取资产的最新 USD 参考行情，不能替代交易报价。

仅当渠道明确返回无行情时，price 才为 null。渠道不可用或返回无效响应不视为无行情。

不接受查询参数。


```json 200
{
  "asset_id": "7453f146-b267-11f1-b4f4-0abd773ba497",
  "symbol": "AAPL",
  "currency": "USD",
  "price": "343.245"
}
```


## OpenAPI

````yaml /zh/stocks/stocks.yaml get /v1/stocks/asset/{asset_id}/price
openapi: 3.0.3
info:
  title: UQPAY Stocks API
  version: 1.0.0
  description: 浏览资产、获取报价、创建订单并查询订单及持仓。金额和数量使用十进制字符串。
  x-source-en-commit: 90aac5e
  x-source-en-path: stocks/stocks.yaml
servers:
  - url: https://api-sandbox.uqpaytech.com/api
    description: Sandbox base URL.
  - url: https://api.uqpay.com/api
    description: Production base URL.
security:
  - AuthToken: []
paths:
  /v1/stocks/asset/{asset_id}/price:
    get:
      tags:
        - Stocks
      summary: 获取最新参考行情
      description: |
        获取资产的最新 USD 参考行情，不能替代交易报价。

        仅当渠道明确返回无行情时，price 才为 null。渠道不可用或返回无效响应不视为无行情。

        不接受查询参数。
      operationId: getStocksPrice
      parameters:
        - $ref: '#/components/parameters/XOnBehalfOf'
        - name: asset_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: List assets 返回的资产标识。
          example: 7453f146-b267-11f1-b4f4-0abd773ba497
      responses:
        '200':
          description: 成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AssetPrice'
              examples:
                sandbox:
                  summary: 沙盒响应
                  value:
                    asset_id: 7453f146-b267-11f1-b4f4-0abd773ba497
                    symbol: AAPL
                    currency: USD
                    price: '343.245'
components:
  parameters:
    XOnBehalfOf:
      in: header
      name: x-on-behalf-of
      required: false
      schema:
        type: string
      description: >-
        指定代表哪个子账户发起请求，应设置为目标子账户的 account_id（完整的小写
        UUID）。若省略或为空，则使用当前认证账户。请求、报价、订单和持仓按生效账户隔离。详见[子账户调用](/zh/stocks/guide/integration#subaccount-requests)。
  schemas:
    AssetPrice:
      type: object
      additionalProperties: false
      properties:
        asset_id:
          type: string
          format: uuid
          description: 平台资产标识，与资产、报价、订单和持仓接口共用。
        symbol:
          type: string
          description: 资产代码。
        currency:
          type: string
          enum:
            - USD
          description: 参考行情币种；无行情时仍为 USD。
        price:
          type: string
          nullable: true
          pattern: ^[0-9]+(\.[0-9]+)?$
          description: 渠道当前提供的参考价格；无行情时为 null，不回退历史快照。不能作为成交价格保证。
      required:
        - asset_id
        - symbol
        - currency
        - price
  securitySchemes:
    AuthToken:
      type: apiKey
      in: header
      name: x-auth-token
      description: UQPAY 提供的 API Token。请填写完整请求头值，包含 `Bearer ` 前缀。

````

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