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

# 查询资产

> 查询资产及其支持的网络能力。资产级和网络级可用能力可能不同。

<RequestExample>
  ```bash cURL
  curl --request GET \
    --url 'https://api-sandbox.uqpaytech.com/api/v1/stocks/asset/7453f146-b267-11f1-b4f4-0abd773ba497' \
    --header "Content-Type: application/json" \
    --header "x-auth-token: Bearer ${SANDBOX_TOKEN}"
  ```
</RequestExample>

<ResponseExample>
  ```json 200
  {
    "asset": {
      "deposit_enabled": true,
      "withdraw_enabled": true,
      "asset_id": "7453f146-b267-11f1-b4f4-0abd773ba497",
      "symbol": "AAPLx",
      "name": "Apple xStock",
      "asset_type": "stock",
      "status": "ACTIVE",
      "can_buy": true,
      "can_sell": true,
      "unavailable_reason": "",
      "reference_price": "334.85",
      "price_currency": "USD",
      "price_updated_at": "2026-09-21T01:30:00.000Z"
    },
    "networks": [
      {
        "can_buy": true,
        "can_sell": true,
        "funding_currencies": [
          "USDC"
        ],
        "limits": [],
        "multiplier": "1",
        "network": "Ethereum",
        "quantity_decimals": 18,
        "token_id": "f8ae8432-14d6-4142-a733-8b989c33ecfb"
      }
    ]
  }
  ```
</ResponseExample>


## OpenAPI

````yaml /zh/stocks/stocks.yaml get /asset/{asset_id}
openapi: 3.0.3
info:
  title: UQPAY Stocks API
  version: 1.0.0
  description: 浏览资产、获取报价、创建订单并查询订单及持仓。金额和数量使用十进制字符串。
  x-source-en-commit: 586409f
  x-source-en-path: stocks/stocks.yaml
servers:
  - url: https://api-sandbox.uqpaytech.com/api/v1/stocks
    description: Sandbox
security:
  - AuthToken: []
paths:
  /asset/{asset_id}:
    get:
      tags:
        - Stocks
      summary: 查询资产
      description: 查询资产及其支持的网络能力。资产级和网络级可用能力可能不同。
      operationId: getStocksAsset
      parameters:
        - 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/AssetDetail'
              examples:
                sandbox:
                  summary: Sandbox response
                  value:
                    asset:
                      deposit_enabled: true
                      withdraw_enabled: true
                      asset_id: 7453f146-b267-11f1-b4f4-0abd773ba497
                      symbol: AAPLx
                      name: Apple xStock
                      asset_type: stock
                      status: ACTIVE
                      can_buy: true
                      can_sell: true
                      unavailable_reason: ''
                      reference_price: '334.85'
                      price_currency: USD
                      price_updated_at: '2026-09-21T01:30:00.000Z'
                    networks:
                      - can_buy: true
                        can_sell: true
                        funding_currencies:
                          - USDC
                        limits: []
                        multiplier: '1'
                        network: Ethereum
                        quantity_decimals: 18
                        token_id: f8ae8432-14d6-4142-a733-8b989c33ecfb
        '400':
          description: 请求失败。读取错误响应中的 type、code 和 message。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: 请求失败。读取错误响应中的 type、code 和 message。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: 请求失败。读取错误响应中的 type、code 和 message。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: 请求失败。读取错误响应中的 type、code 和 message。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 请求失败。读取错误响应中的 type、code 和 message。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: 请求失败。读取错误响应中的 type、code 和 message。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '502':
          description: 网关未能完成请求。写入操作应先核对结果，再使用同一幂等键重试。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: 请求失败。读取错误响应中的 type、code 和 message。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      x-codeSamples:
        - lang: cURL
          source: |-
            curl --request GET \
              --url 'https://api-sandbox.uqpaytech.com/api/v1/stocks/asset/7453f146-b267-11f1-b4f4-0abd773ba497' \
              --header "Content-Type: application/json" \
              --header "x-auth-token: Bearer ${SANDBOX_TOKEN}"
components:
  schemas:
    AssetDetail:
      type: object
      additionalProperties: false
      properties:
        asset:
          $ref: '#/components/schemas/Asset'
          description: 资产基本信息对象
        networks:
          type: array
          items:
            $ref: '#/components/schemas/NetworkCapability'
          description: 当前配置的网络部署与能力；只读账户的买卖能力为 false
      required:
        - asset
        - networks
    Error:
      type: object
      additionalProperties: false
      required:
        - type
        - code
        - message
      properties:
        type:
          type: string
          description: 用于分类处理失败的错误类别。
          pattern: ^[a-z][a-z0-9]*(_[a-z0-9]+)*$
        code:
          type: string
          description: 可供程序处理的业务错误码。结合 HTTP 状态处理，不要依赖 message 文本匹配。
          pattern: ^[a-z][a-z0-9]*(_[a-z0-9]+)*$
        message:
          type: string
          description: 错误原因的可读说明。
    Asset:
      type: object
      additionalProperties: false
      properties:
        asset_id:
          type: string
          format: uuid
          description: 平台资产 UUID，列表与所有交易接口共用
          example: 7453f146-b267-11f1-b4f4-0abd773ba497
        symbol:
          type: string
          description: 资产代码。
          example: AAPLx
        name:
          type: string
          description: 资产名称。
          example: Apple xStock
        asset_type:
          type: string
          description: 资产类别，沿用资产目录的分类值
          example: stock
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          description: 资产目录中的可用状态。请求报价前还应检查当前账户的买入和卖出能力。
          example: ACTIVE
        can_buy:
          type: boolean
          description: 当前资产和账户是否允许买入；提交时重新校验
          example: true
        can_sell:
          type: boolean
          description: 当前资产和账户是否允许卖出；提交时重新校验
          example: true
        unavailable_reason:
          type: string
          description: 无法交易的原因。空字符串表示未返回阻止交易的原因。
          example: ''
        reference_price:
          type: string
          pattern: ^-?[0-9]+(\.[0-9]+)?$
          nullable: true
          description: 每单位资产的参考价格，仅用于展示。交易和对账应使用报价及已结算订单；null 表示参考价格不可用。
          example: '334.85'
        price_currency:
          type: string
          enum:
            - USD
          description: 参考价格的计价币种。
          example: USD
        price_updated_at:
          type: string
          format: date-time
          nullable: true
          description: 该参考行情采样时间
          example: '2026-09-21T01:30:00.000Z'
        deposit_enabled:
          type: boolean
          description: 当前资产及账户是否已启用充值能力，与买入能力分别判断。
          example: true
        withdraw_enabled:
          type: boolean
          description: 当前资产及账户是否已启用提现能力，与卖出能力分别判断。
          example: true
      required:
        - asset_id
        - symbol
        - name
        - asset_type
        - status
        - can_buy
        - can_sell
        - unavailable_reason
        - reference_price
        - price_currency
        - price_updated_at
        - deposit_enabled
        - withdraw_enabled
    NetworkCapability:
      type: object
      additionalProperties: false
      properties:
        network:
          type: string
          description: 该代币部署所属的区块链网络。
          example: Ethereum
        token_id:
          type: string
          format: uuid
          description: 该网络部署记录 UUID，不是链上合约地址
          example: f8ae8432-14d6-4142-a733-8b989c33ecfb
        can_buy:
          type: boolean
          description: 当前资产和账户是否允许买入；提交时重新校验
          example: true
        can_sell:
          type: boolean
          description: 当前资产和账户是否允许卖出；提交时重新校验
          example: true
        quantity_decimals:
          type: integer
          description: 该网络 Token 的链上精度，输入上限仍受公共 API 规则限制
          example: 18
        multiplier:
          type: string
          pattern: ^-?[0-9]+(\.[0-9]+)?$
          nullable: true
          description: 该代币部署对应的份额乘数；不可用时为 null。
          example: '1'
        funding_currencies:
          type: array
          items:
            type: string
            enum:
              - USDC
            example: USDC
          description: 当前支持的资金币种列表，现为 USDC
        limits:
          type: array
          items:
            type: object
            additionalProperties: false
            properties: {}
          description: 空集合不代表已确定最小或最大交易量；报价请求会单独校验交易限制。
      required:
        - network
        - token_id
        - can_buy
        - can_sell
        - quantity_decimals
        - multiplier
        - funding_currencies
        - limits
  securitySchemes:
    AuthToken:
      type: apiKey
      in: header
      name: x-auth-token
      description: 由 UQPAY 提供的登录 API Token。

````