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

# 获取锁定 CPMM 头寸元数据

> 获取锁定 Constant Product Market Maker 头寸的元数据。返回 LP 代币数额、流动性池份额百分比和锁定期间的可领取费用。




## OpenAPI

````yaml /zh/api-reference/openapi/dynamic-ipfs-v1.yaml get /lock/cpmm/position
openapi: 3.0.3
info:
  title: 动态 IPFS API
  description: >
    为 CLMM 头寸重新生成动态 NFT 元数据和图像。供 dApps 获取实时头寸视觉效果和估值数据，包括流动性池详情、数额、费用和奖励。


    该服务在 IPFS 中缓存头寸元数据，并按头寸 ID 提供计算后的头寸状态（USD 价值、TVL 占比、未领取费用）。支持 CLMM 和 CPMM
    池类型的已解锁和锁定头寸。
  version: 1.0.0
  contact:
    name: Raydium
    url: https://raydium.io
servers:
  - url: https://dynamic-ipfs.raydium.io
    description: Mainnet
  - url: https://dynamic-ipfs-devnet.raydium.io
    description: Devnet
security: []
tags:
  - name: CLMM Position
    description: 获取 Concentrated Liquidity Market Maker 头寸的动态元数据
  - name: Locked Positions
    description: 获取锁定头寸数据（CLMM 和 CPMM）
paths:
  /lock/cpmm/position:
    get:
      tags:
        - Locked Positions
      summary: 获取锁定 CPMM 头寸元数据
      description: >
        获取锁定 Constant Product Market Maker 头寸的元数据。返回 LP
        代币数额、流动性池份额百分比和锁定期间的可领取费用。
      operationId: getLockedCpmmPosition
      parameters:
        - name: id
          in: query
          required: true
          description: 锁定 CPMM 头寸 PDA 公钥（base58）
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CPNFTInterface'
        '400':
          description: 无效的头寸 ID 或所有者不匹配
          content:
            text/plain:
              schema:
                type: string
        '404':
          description: 未找到头寸
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: 服务器错误
          content:
            text/plain:
              schema:
                type: string
components:
  schemas:
    CPNFTInterface:
      type: object
      description: 包含流动性池详情和估值的完整 CPMM 锁定头寸
      properties:
        poolInfo:
          $ref: '#/components/schemas/PoolInfoCPMM'
        positionInfo:
          $ref: '#/components/schemas/CPPositionInfo'
      required:
        - poolInfo
        - positionInfo
    PoolInfoCPMM:
      type: object
      description: Constant Product Market Maker 流动性池信息
      properties:
        id:
          type: string
        mintA:
          $ref: '#/components/schemas/MintInfo'
        mintB:
          $ref: '#/components/schemas/MintInfo'
        lpMint:
          $ref: '#/components/schemas/MintInfo'
        lpPrice:
          type: number
          description: LP 代币的 USD 价格
    CPPositionInfo:
      type: object
      description: CPMM 锁定头寸状态
      properties:
        tvlPercentage:
          type: number
          description: 流动性池份额百分比（0-100）
        usdValue:
          type: number
          description: 锁定的 LP 价值（美元）
        amountA:
          type: number
          description: 代币 A 的底层数量
        amountB:
          type: number
          description: 代币 B 的底层数量
        unclaimedFee:
          $ref: '#/components/schemas/CPUnclaimedFeeInfo'
      required:
        - tvlPercentage
        - usdValue
        - amountA
        - amountB
        - unclaimedFee
    MintInfo:
      type: object
      properties:
        address:
          type: string
          description: 代币铸造地址
        decimals:
          type: integer
          description: 代币精度
        symbol:
          type: string
          description: 代币符号
    CPUnclaimedFeeInfo:
      type: object
      description: 从锁定的 CPMM 头寸中可领取的 LP 和手续费
      properties:
        lp:
          type: number
          description: 可领取的 LP 数量
        amountA:
          type: number
          description: 可领取的代币 A
        amountB:
          type: number
          description: 可领取的代币 B
        usdValue:
          type: number
          description: 可领取价值（美元）

````