raydium-io / raydium-sdk-V2-demo

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

fetchPoolById returns null for the main-net #65

Closed nvtrireme closed 2 months ago

nvtrireme commented 2 months ago

I'm trying to get the pool information for a recently created pool (created within the last 1-2 minutes) using the following code:

const data = await raydiumSdk.api.fetchPoolById({ ids: poolId }); const poolDetails = data[0];

However, poolDetails is coming back as null. When I try to get the information using "getRpcPoolInfos", it works fine.

cruzshia commented 2 months ago

api do have some latency for new created pool, if you really need to get pool info before api updated, I'll suggest you go with rpc method, thanks.