I currently have an open CLMM position and this SDK function is yielding a result that says I don't have any positions. Can someone please help here? The fetchPoolInfo works fine when I am using the NFT token ID, but as soon as I try to use all positions, I receive the use do not have position error.
const allPosition = await raydium.clmm.getOwnerPositionInfo({ programId: CLMM_PROGRAM_ID }) // devnet: DEVNET_PROGRAM_ID.CLMM
const nonZeroPosition = allPosition.filter((p) => !p.liquidity.isZero())
if (!nonZeroPosition.length) throw new Error('use do not have position')
what's your wallet address? just have a test and const allPosition = await raydium.clmm.getOwnerPositionInfo({ programId: CLMM_PROGRAM_ID }) code works well
I currently have an open CLMM position and this SDK function is yielding a result that says I don't have any positions. Can someone please help here? The fetchPoolInfo works fine when I am using the NFT token ID, but as soon as I try to use all positions, I receive the use do not have position error.
const allPosition = await raydium.clmm.getOwnerPositionInfo({ programId: CLMM_PROGRAM_ID }) // devnet: DEVNET_PROGRAM_ID.CLMM const nonZeroPosition = allPosition.filter((p) => !p.liquidity.isZero()) if (!nonZeroPosition.length) throw new Error('use do not have position')
Thanks.