raydium-io / raydium-sdk-V2-demo

Open-source Typescript SDK demos
50 stars 31 forks source link

Pulling Information for All Positions is Yielding an Error #69

Closed GENERATIONART closed 2 months ago

GENERATIONART commented 2 months ago

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.

cruzshia commented 2 months ago

what's your wallet address? just have a test and const allPosition = await raydium.clmm.getOwnerPositionInfo({ programId: CLMM_PROGRAM_ID }) code works well