Raydium LaunchLab API
New pools, migrations, and price changes
The SolanaStreaming WebSocket API represents LaunchLab events with
sourceExchange: "raydium_launchlab"; Bonk.fun and Stonk.fun launches
are distinguished by subExchange. A LaunchLab migration is emitted as a new-pool event
with pair.migration: "raydium_launchlab" on the destination exchange. See example code
snippets for different use cases below.
Install ws with npm install ws and set
YOUR_API_KEY_HERE. Each example below opens its own authenticated connection.
Subscribe to new LaunchLab pools
const WebSocket = require("ws");
const ws = new WebSocket("wss://api.solanastreaming.com/", {
headers: { "X-API-KEY": "YOUR_API_KEY_HERE" }
});
ws.on("open", () => {
ws.send(JSON.stringify({
method: "newPairSubscribe",
params: { include: { sourceExchange: ["raydium_launchlab"] } }
}));
console.log("Listening for new LaunchLab pools...");
});
ws.on("message", raw => {
const message = JSON.parse(raw.toString());
if (message.error) return console.error("API error:", message.error);
if (message.params)
console.log("New LaunchLab pool:", message.params);
});
ws.on("error", console.error);
Subscribe to Raydium LaunchLab migrations
const WebSocket = require("ws");
const ws = new WebSocket("wss://api.solanastreaming.com/", {
headers: { "X-API-KEY": "YOUR_API_KEY_HERE" }
});
ws.on("open", () => {
ws.send(JSON.stringify({
method: "newPairSubscribe",
params: { include: { migration: ["raydium_launchlab"] } }
}));
console.log("Listening for Raydium LaunchLab migrations...");
});
ws.on("message", raw => {
const message = JSON.parse(raw.toString());
if (message.error) return console.error("API error:", message.error);
if (message.params)
console.log("Raydium LaunchLab migration:", message.params);
});
ws.on("error", console.error);
Subscribe to a single LaunchLab token for price changes by mint address
const WebSocket = require("ws");
const ws = new WebSocket("wss://api.solanastreaming.com/", {
headers: { "X-API-KEY": "YOUR_API_KEY_HERE" }
});
ws.on("open", () => {
ws.send(JSON.stringify({
method: "swapSubscribe",
params: { include: { baseTokenMint: ["TOKEN_MINT_HERE"] } }
}));
console.log("Listening for LaunchLab token price changes...");
});
ws.on("message", raw => {
const message = JSON.parse(raw.toString());
if (message.error) return console.error("API error:", message.error);
if (message.params)
console.log("LaunchLab token price change:", message.params);
});
ws.on("error", console.error);
Subscribe to a single LaunchLab token for price changes by pool address
const WebSocket = require("ws");
const ws = new WebSocket("wss://api.solanastreaming.com/", {
headers: { "X-API-KEY": "YOUR_API_KEY_HERE" }
});
ws.on("open", () => {
ws.send(JSON.stringify({
method: "swapSubscribe",
params: { include: { ammAccount: ["POOL_ADDRESS_HERE"] } }
}));
console.log("Listening for LaunchLab pool price changes...");
});
ws.on("message", raw => {
const message = JSON.parse(raw.toString());
if (message.error) return console.error("API error:", message.error);
if (message.params)
console.log("LaunchLab pool price change:", message.params);
});
ws.on("error", console.error);
Subscribe to all LaunchLab pool price changes
const WebSocket = require("ws");
const ws = new WebSocket("wss://api.solanastreaming.com/", {
headers: { "X-API-KEY": "YOUR_API_KEY_HERE" }
});
ws.on("open", () => {
ws.send(JSON.stringify({
method: "swapSubscribe",
params: { include: { sourceExchange: ["raydium_launchlab"] } }
}));
console.log("Listening for LaunchLab price changes...");
});
ws.on("message", raw => {
const message = JSON.parse(raw.toString());
if (message.error) return console.error("API error:", message.error);
if (message.params)
console.log("LaunchLab price change:", message.params);
});
ws.on("error", console.error);
The pair filter uses OR matching; inspect the event fields to classify launches and migrations.
To receive only one LaunchLab platform, replace the source filter with
subExchange: ["bonkfun"] or subExchange: ["stonkfun"]. Swap events provide the
observed quotePrice, amounts, and transaction metadata. QuotePrice is denoted
in the quote token of the swap. To get the usdPrice you must convert the quoteToken to USD.
See the new-pair reference and swap reference.
Raydium LaunchLab WebSocket API FAQ
How do I distinguish Bonk.fun and Stonk.fun launches?
Read pair.subExchange on new-pair events or swap.subExchange on swap events.
Values include bonkfun and stonkfun.
How do I identify a token that migrated from LaunchLab?
Subscribe to new pairs with migration: ["raydium_launchlab"] and check
pair.migration. The same event's pair.sourceExchange identifies its
destination exchange.