Open Position
Create a new position NFT that represents your liquidity ownership in a DLMM pool. Position NFTs track your share across multiple bins and enable granular liquidity management.
Prerequisites
Before opening a position:
Have a valid LBPair object from
getPair()Connected wallet with sufficient gas
Understanding of position NFTs in DLMM
Plan for liquidity distribution (can add later)
Basic Usage
// Get the pair first
const pair = await sdk.Pair.getPair(pairAddress);
// Create a new empty position
const tx = await sdk.Pair.openPosition(pair);
// Execute transaction
const result = await sdk.fullClient.signAndExecuteTransaction({
transaction: tx,
signer: keypair
});
console.log("Position NFT created:", result.digest);Method Signature
Parameters
pair: The LBPair to create position fortx: Optional existing transaction to append to
Returns
Transaction object ready for execution
Position NFT will be transferred to sender
Understanding Position NFTs
Position NFTs in DLMM:
Unique ownership: Each NFT represents your specific liquidity
Multi-bin support: Can hold liquidity across many price levels
Fee tracking: Accumulates your share of trading fees
Transferable: Can be sent to other addresses
Composable: Can be used in other protocols
Creating and Adding Liquidity
Two-Step Process
One-Step Process (Recommended)
Batch Operations
Finding Your Position ID
After creation, retrieve the position ID from transaction events:
Gas Optimization
Opening an empty position uses minimal gas. Consider:
Batch position creation with liquidity addition
Use
openPositionAndAddLiquidity()for efficiencyReuse existing positions when possible
Common Patterns
Position for Range Order
Multi-Strategy Positions
Related Topics
Add to New Position - Create and fund together
Get User Positions - List your positions
Add to Existing Position - Fund created positions
Close Position - Remove and burn position NFT
Last updated