Get User Positions
List all DLMM position NFTs owned by a specific address, with optional filtering by trading pairs. This method helps track and manage your liquidity portfolio across multiple pools.
Prerequisites
Before fetching positions:
Set valid sender address in SDK
Understand position NFT structure
Know pair IDs for filtering (optional)
Basic Usage
// Set the address to query
sdk.senderAddress = "0x123...";
// Fetch all positions for the address
const positions = await sdk.Position.getLbPositions([]);
console.log(`Found ${positions.length} positions`);
// Display position details
positions.forEach(position => {
console.log({
positionId: position.id,
pairId: position.pair_id,
name: position.name,
description: position.description
});
});Method Signature
Parameters
pairIds: Array of pair addresses to filter by (empty array returns all)
Returns
Array of LBPosition objects:
Filtering Positions
By Specific Pairs
By Token Types
Getting Position Details
Portfolio Analysis
Check Position Status
Common Use Cases
Portfolio Dashboard: Display all user positions
Position Management: Find positions to add/remove liquidity
Fee Collection: Identify positions with claimable fees
Performance Tracking: Monitor position returns across pairs
Performance Notes
Fetches all positions owned by the address
Uses efficient pagination internally
Filtered results are processed client-side
Consider caching for frequent queries
Error Handling
Related Topics
Open Position - Create new position NFTs
Get Single Position - Detailed position data
Get Position Bins - View liquidity distribution
Position Value - Calculate portfolio value
Last updated