I'm trying to fetch the pool keys that are necessary to make swap a transaction using the Raydium SDK. These keys are available in the https://api.raydium.io/v2/sdk/liquidity/mainnet.json file, but this is not updated in real time and its download is heavily rate-limited. So what happens is that when I detect a new liquidity pool using dextools.io APIs I would need to wait several minutes for this information to be available.
How do websites like dextools.io get the information about the pool when it's not in the mainnet.json file yet? Based on a similar question (Faster method to retrieve pool keys [Raydium]) asked previously, I assume this can be done with the getProgramAccounts RPC call, but:
- This call is not available on the RPC providers I've tried, as it appears to be very expensive
- Discarding point 1. it seems that the call requires a
marketProgramId
which is itself available only through the mainnet.json file (as far as I understand things).
EDIT I might've understood that the marketProgramId
refers to the Serum program (srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX
) but even if this is correct the call is still blocked for the performance reasons mentioned earlier.
How to sort this out?