> ## 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-Hant/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 價值（USD）
        amountA:
          type: number
          description: Token A 的基礎金額
        amountB:
          type: number
          description: Token B 的基礎金額
        unclaimedFee:
          $ref: '#/components/schemas/CPUnclaimedFeeInfo'
      required:
        - tvlPercentage
        - usdValue
        - amountA
        - amountB
        - unclaimedFee
    MintInfo:
      type: object
      properties:
        address:
          type: string
          description: 代幣 Mint 地址
        decimals:
          type: integer
          description: 代幣小數位數
        symbol:
          type: string
          description: 代幣符號
    CPUnclaimedFeeInfo:
      type: object
      description: 從已鎖定 CPMM 部位可領取的 LP 和費用
      properties:
        lp:
          type: number
          description: 可領取的 LP 金額
        amountA:
          type: number
          description: 可領取的 Token A
        amountB:
          type: number
          description: 可領取的 Token B
        usdValue:
          type: number
          description: 可領取價值（USD）

````