This endpoint requires a Growth or Enterprise plan. Learn more.
Returns
LiquidityLockConnection
Arguments
String
The address of the pair.
String
The address of the token.
Int!
required
The network id of the pair.
String
A cursor for use in pagination.
Example
Test this query in the Explorer →Usage Guidelines
- Query by
pairAddressto get all locks for a specific trading pair, or bytokenAddressto get locks across all pairs containing that token networkIdis required — specify the chain (e.g.,1399811149for Solana,1for Ethereum)- Each lock includes
ownerAddress(who created the lock),lockerAddress(the locker contract), and timing info (createdAt,unlockAt) lockProtocolindicates the locking mechanism; seeLiquidityLockProtocolfor every value and what it coverspairLiquidityDataprovidestotalLiquidityfor each pair — sumliquidityAmountfrom items to get total locked- Use
cursorfor pagination when there are many lock records
Troubleshooting Tips
What's the difference between liquidityLocks and liquidityMetadata?
What's the difference between liquidityLocks and liquidityMetadata?
liquidityLocks returns individual lock records with details like owner, unlock time, and amounts. liquidityMetadata returns aggregated lock data (total locked vs total liquidity) without individual lock details. Use liquidityLocks when you need to display a list of locks or check specific unlock dates.What does unlockAt: null mean?
What does unlockAt: null mean?
When
unlockAt is null, the liquidity is permanently locked. This typically happens with BURN locks where LP tokens are sent to a burn address, or locks created without an expiration. These locks cannot be withdrawn.What is liquidityNftData?
What is liquidityNftData?
For concentrated liquidity pools (UniV3, Orca Whirlpool), liquidity positions are represented as NFTs.
liquidityNftData contains the nftTokenId and nftPositionManagerAddress for these positions. It’s null for traditional LP token locks.How do I calculate locked percentage?
How do I calculate locked percentage?
Sum the
liquidityAmount from all items to get total locked liquidity, then divide by totalLiquidity from pairLiquidityData: lockedPercentage = sumOfLiquidityAmounts / totalLiquidity * 100. Because this query is event-derived, expired or withdrawn locks can still appear in items, so the sum can overstate what is locked today. liquidityLocksV2 returns lockedPercent from a single current on-chain read instead.Why does this query still show a lock that expired or was withdrawn?
Why does this query still show a lock that expired or was withdrawn?
liquidityLocks only knows about a lock from the transaction that created it and does not re-check it afterwards. Locks created before Codex indexed a protocol are also missing. Both are fixed in liquidityLocksV2, which reads the locker’s current registry, hook custody, or lock accounts directly.