Detecting new Pools on Raydium AMM
Monitoring New Raydium AMM Pools Using Yellowstone gRPC
Last updated
Was this helpful?
Monitoring New Raydium AMM Pools Using Yellowstone gRPC
Last updated
Was this helpful?
In the fast-moving world of decentralized finance, being among the first to identify new liquidity pools can offer significant advantages. Raydium AMM frequently sees the creation of new pools, and quickly detecting these allows traders and analysts to capitalize on early opportunities. In this document, we will illustrate how we can detect new Pools on Raydium AMM
The complete source code for this project is available on GitHub.
Please feel free to clone the repository and try it out. Additionally, you will find other relevant and useful code examples related to gRPC and streaming .
This project consists of two key components:
Create a Yellowstone gRPC SubscribeRequest
with Raydium AMM Filters
Parse the Incoming Account Data
The first step involves initializing the Solana Yellowstone Client. You can get Solana Yellowstone gRPC access from the Shyft Dashboard. Please check out our for more details.
Once you have the authentication details, you can initialize the client in the following manner,
You can use any Yellowstone gRPC endpoint with this client. An access token is optional, as some gRPC services don't require authentication.
The Rust client supports several additional options, as demonstrated in the example above. Most of these options are also available for the TS client, where they are passed as the third argument to the Client
constructor.
We first construct a SubscribeRequest
targeting the Raydium AMM program (675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8
) with specific account-level memcmp filters:
Filter 1: Matches liquidity pools where the quoteMint
is SOL (So1111...
), identifying pools paired with SOL.
Filter 2: Verifies that the marketProgramId
is set to Raydium Serum Market (srmqPvym...
).
Filters 3 & 4: Ensure both swapQuoteInAmount
and swapBaseOutAmount
are initially zeroβindicating the pool has just been created and no swaps have occurred yet.
This setup streams only newly initialized Raydium AMM liquidity pool accounts that meet these conditions.
Once the subscription is active, your gRPC client starts receiving account updates in real-time. You check for the presence of an account
field in the stream. The tOutPut()
function decodes and extracts critical on-chain metadata about the Raydium pool:
This function extracts:
signature
: The transaction signature associated with the account creation.
pubKey
: The public key of the new Raydium pool account.
owner
: Should match the Raydium AMM program ID.
poolstate
: Decoded struct holding all AMM pool configuration details (mints, reserves, fee structure, etc.).
slot
: Solana slot number when the update occurred.
To specify what on-chain data, we send a SubscribeRequest
over the existing Solana Yellowstone gRPC client. These Request allows you to filter for specific accounts, transactions, slots, or other Solana on-chain events, giving you full control over the data you receive. You can find out more about here.
Once established, the stream will begin sending data directly to your application. You have the flexibility to on the fly, allowing you to change the data specifications you receive without stopping your stream. For more details on , or , you can find additional information in our .
β In-depth technical docs for implementing real-time streaming with Yellowstone gRPC and Geyser plugin on Solana.
β Guides, use cases, and performance benchmarks for building low-latency Solana applications using gRPC-based infrastructure.
β Ready-to-use code snippets and integrations for common DeFi protocols, transaction parsers, and real-time Solana data streaming use cases.