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

# liquidityMetadata

> Returns liquidity metadata for a given pair. Includes liquidity lock data.

<div data-generated>
  ## GraphQL

  ```
  type Query {
    # Requires a Growth or Enterprise plan.
    liquidityMetadata(
      pairAddress: String!
      networkId: Int!
    ): LiquidityMetadata
  }

  enum LiquidityLockProtocol {
    BASECAMP_V1
    UNCX_V2
    UNCX_V3
    BURN
    BITBOND
    METEORA_DAMM_V2
    DOPPLER
    O1_EXCHANGE
    PONS_V2
  }

  type LockBreakdown {
    lockProtocol: LiquidityLockProtocol!
    active: String!
    inactive: String!
  }

  type LockedLiquidityData {
    active: String!
    inactive: String!
    lockBreakdown: [LockBreakdown]!
  }

  type LiquidityData {
    active: String!
    inactive: String!
  }

  type LiquidityMetadata {
    lockedLiquidity: LockedLiquidityData!
    liquidity: LiquidityData!
  }
  ```
</div>

<Info>
  We support lock info on UniV3, UniV4, RaydiumV4, PumpAMM, and token burns on Solana.
</Info>

### Example

<a href="/explore" target="_blank" rel="noopener noreferrer">Test this query in the Explorer →</a>

```graphql theme={null}
{
  liquidityMetadata(
    pairAddress: "8WwcNqdZjCY5Pt7AkhupAFknV2txca9sq6YBkGzLbvdt"
    networkId: 1399811149
  ) {
    lockedLiquidity {
      active
      inactive
      lockBreakdown {
        lockProtocol
        active
        inactive
      }
    }
    liquidity {
      active
      inactive
    }
  }
}
```

### Usage Guidelines

* Provide `pairAddress` and `networkId` to get liquidity and lock metadata for a specific trading pair
* `liquidity` returns total `active` and `inactive` liquidity amounts in the pair
* `lockedLiquidity` shows how much liquidity is locked, with a `lockBreakdown` by protocol
* Lock protocols include `BURN` (burned LP tokens), `UNCX_V2`, `UNCX_V3`, `BASECAMP_V1`, `BITBOND`, `METEORA_DAMM_V2`
* For token-level aggregated lock data across all pairs, use `liquidityMetadataByToken` instead
* Active vs inactive liquidity: in concentrated liquidity pools (UniV3, Orca Whirlpool), liquidity outside the current price range is "inactive"

### Troubleshooting Tips

<AccordionGroup>
  <Accordion title="What's the difference between active and inactive liquidity?">
    In concentrated liquidity pools, liquidity providers choose price ranges. `active` liquidity is within the current trading range and earns fees. `inactive` liquidity is outside the current range and doesn't participate in trades until the price moves into its range. For constant-product AMMs, all liquidity is typically "active".
  </Accordion>

  <Accordion title="What do the lock protocols mean?">
    `BURN` means LP tokens were sent to a burn address (permanently locked). `UNCX_V2`/`UNCX_V3` refers to the UNCX liquidity locker. `BASECAMP_V1` and `BITBOND` are other locker protocols. `METEORA_DAMM_V2` is Meteora's DAMM locker on Solana. Locked liquidity indicates developer commitment and reduces rug-pull risk.
  </Accordion>

  <Accordion title="When should I use liquidityMetadata vs liquidityMetadataByToken?">
    Use `liquidityMetadata` when you have a specific pair and want detailed lock info for that pool. Use `liquidityMetadataByToken` when you want aggregated liquidity data across all pairs containing a token (up to 100 pairs), including total locked percentage and USD values.
  </Accordion>

  <Accordion title="Why is lockBreakdown empty for some pairs?">
    Not all pairs have locked liquidity. If no LP tokens have been burned or locked via a supported protocol, `lockBreakdown` will be an empty array. This is normal for many pairs — locked liquidity is a trust signal, not a requirement.
  </Accordion>
</AccordionGroup>
