How to get new Solana Raydium Pairs
Ok, so you need a steady, cheap, fast feed of new solana tokens from raydium. A lot of people want this to discover the new tokens on solana as quickly as possible or to build up their own analysis tool. There are many use cases for data like this. However, in my experience it can be difficult to hit the ground running getting such data.
Coinmarketcap, coingecko or even dexscreener can provide this data, but its either a bit clunky to access or very delayed. You could get the data directly from the chain yourself but this often required paying for an rpc endpoint. It then requires in-depth knowledge to understand how to read solana transactions and extract specific information like pair created. This is why I built solanastreaming.com
You can get a feed of new tokens very quickly by following a few steps...
1. Signup at solanastreaming.com
Get your api key at solanastreaming.com/dashboard for access to our websocket api. We use websockets to provide you with the fastest possible data. It is an industry standard for streaming data and is used by many exchanges and financial institutions. A free account is always available to help you analyse our data and ensure its right for what you need.
2. Connect to the websocket api
Connect to our websocket using your preferred programming language. Examples can be found on the
home page. For this article, I will use wscat
. It is a command line
program that runs on node which can be used on windows and mac.
wscat --connect wss://api.solanastreaming.com --header X-API-KEY:923aeea0ac3549a80dcd9f881986eaf7
The api key in the command above is a demo key and should be replaced with your own. If you get an error instead of getting connected straight away, you can curl the endpoint for a more accurate error diagnosis:
curl https://api.solanastreaming.com -i --header "X-API-KEY: 923aeea0ac3549a80dcd9f881986eaf7"
3. Subscribe to the data you want
Once connected, you will need to subscribe to the events you want to receive. In the case of new pairs, you can send the following over the websocket. It will give all new raydium pairs that have a pair with wsol.
{"id":1,"method":"newPairSubscribe"}
All messages sent over the websocket connection must conform the jsonrpc spec.
The server will respond with either a failure or a success with the subscription id which is used if you want to stop receiveing these events. To find out more about the different endpoints and data received you can check out the docs. Below is an example response from the server for a new pair created.
{ "slot": 301578636, "signature": "UWnvRXCHpmDxb9tQAYYEEoY8r2JVZ3CcbDLpsFp8EGBdv5njjyEkGXhYxcFCc7Y68X15SWrfve4rycvM4vGRJh7", "blockTime": 1731688226, "pair": { "sourceExchange": "raydium", "ammAccount": "CDnqCfvxQvncrWpoTT36xBCcthzQyh8RumuvoFsFZNVC", "baseToken": { "account": "G9GZaVRPiYRfNQF7oqNoeXKwB5jFbLSHe5fxLcCpump", "info": { "decimals": 9, "supply": "206900000000000000", "metadata": { "name": "randomcoin", "symbol": "randomcoin", "logo": "https://arweave.net/xDf9sPlSY4SMmFQzyCK-xakNl-m7a17lKPO6BttSO3M" }, "mintAuthority": null, "freezeAuthority": null } }, "quoteToken": { "account": "So11111111111111111111111111111111111111112", "info": null }, "baseTokenLiquidityAdded": "206900000000000000", "quoteTokenLiquidityAdded": "630000000000" } }
6. Upgrade (if nessisary)
As our free accounts only provide a limited number of messages sufficient to analyse the platform, you will need to upgrade your account to get a full stream of the chain data. We dont charge by some arbitrary credit system, we charge a flat fee every month for all the data.
Get started by signing up for an api key now!
Disclaimer
Whilst we do our very best to make sure we capture all events and send them to you as quickly as possible, there may be random events where a very slight service interruption may occour. Usually, it is sufficient to reconnect and continue. We cannot guarentee 100% reliability and accuracy.