Member-only story

How to fetch newly created pairs/pools on Solana Raydium Dex with solana-py

Henry Tirla
2 min readJan 14, 2024

--

Everything in solana is an account and understanding how these accounts interact with each other is key in understanding how solana token accounts interact with each other. In this case we will be focus on transactions involving Raydium Liquidity Pool V4 mint address: 675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8.

Using LogSubscribe rpc node connection we will be looking for the initialize2 instruction emitted by raydim dex during the creation of pools for new token and found in each transaction instruction list.

Expected Output

Here is my full solution

To Elaborate more on my solution. I am simply listening to all transanction involving Raydium Pool V4 Address decoding these transactions and searching through the logs if the word initialize 2 is found, if yes then I am certain this is a Pool created transaction hash because it’s only found in created pools log.

How efficient is this method is something to debate about because unlike EVM compatible chains there are no logs implemented on Solana that permits you to listen to certain types of transactions without explicitly deconding the transaction hash. Another approach I found onchain is some addresses will track metaplex for newly created token and serum program id for newly created markets. How efficient…

--

--

Responses (2)

Write a response