Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Fetching new pool keys faster #73

Open
Stickmen1 opened this issue Apr 3, 2024 · 10 comments
Open

Fetching new pool keys faster #73

Stickmen1 opened this issue Apr 3, 2024 · 10 comments

Comments

@Stickmen1
Copy link

Hello,
Is there a way to get the pool keys information based on provided quoteMint and baseMint without having to load the whole raydium mainnnet.json since that takes a lot of time. Or for example to load the mainnet.json and update it real-time so that the pool keys are real-time updated?

@talss89
Copy link

talss89 commented Apr 3, 2024

Hi 👋

Yes. Check out https://github.com/raydium-io/raydium-sdk-V1-demo/blob/master/src/subNewAmmPool.ts

You can subscribe to AMM pool creation and generate the pool key structures much faster than pulling mainnet.json.

You'll need to refactor, but hopefully it points in the right direction.

@Stickmen1
Copy link
Author

Stickmen1 commented Apr 3, 2024

I already saw that but when trying to implement it, this does not run (when running the function it just skips it)

rpcConnInfo.on("data", (data) => {
callback(data, programId)
});

I think it is possible the subscribe() to not function as it should

@talss89
Copy link

talss89 commented Apr 3, 2024

That code is assuming you're connected to a supported Geyser gRPC node.

You need to refactor it to work with a normal WS / HTTP node if you're not getting events.

@Stickmen1
Copy link
Author

Can you guide me a little bit more about how I am supposed to refactor it?

@Millionarc
Copy link

Hearing it's possible to fetch pool keys with 0 rpc calls and only using a token mint address, is there anything online/opensource that shows how to do this? Or is it just a false rumor

@Isljeri
Copy link

Isljeri commented May 7, 2024

Did you manage to solve the problem @Stickmen1 . I have got to the same issue and could need some help.

@romby1
Copy link

romby1 commented May 18, 2024

Did you manage to solve the problem @Stickmen1 . I have got to the same issue and could need some help.

do you got it working faster ?

@mcfriend99
Copy link

Hearing it's possible to fetch pool keys with 0 rpc calls and only using a token mint address, is there anything online/opensource that shows how to do this? Or is it just a false rumor

Did you find a solution??

@DAHCROWN
Copy link

I was able to create a script that's an hybrid of SDK V1 and V2. It correctly constructs a ApiPoolInfoV4 instance of any pool using the Pool ID. (Gotten from the Raydium API v3)

@Millionarc
Copy link

Hearing it's possible to fetch pool keys with 0 rpc calls and only using a token mint address, is there anything online/opensource that shows how to do this? Or is it just a false rumor

Did you find a solution??

Yes, unfortunately I cannot share due to competition issues and the time it took, but if you research hard enough you'll figure it out.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants