Detect New Pump.fun Token Mints with Solana gRPC
Subscribe to the Pump.fun program with Yellowstone gRPC and parse token mint events as they land on Solana.
New Pump.fun mints appear before the UI catches up
Pump.fun is Solana's largest token launchpad, minting hundreds of new tokens daily. For traders and bot developers, detecting these launches instantly, before they appear on any UI, is a significant edge.
The job is to subscribe at the program level, filter for create instructions, and extract the mint, name, symbol and metadata URI before a slower polling loop ever sees the launch.
Why gRPC for Token Detection?
Traditional approaches like polling getSignaturesForAddress have fundamental latency limitations:
- Polling interval, Even at 1-second intervals, you're always behind
- Rate limits, Aggressive polling gets throttled
- Missed events, Between polls, tokens can launch and be sniped
gRPC streaming eliminates all of these issues by pushing data the instant a transaction is confirmed.
Subscribe to Pump.fun program transactions
import Client, { CommitmentLevel } from '@triton-one/yellowstone-grpc';
const PUMP_FUN_PROGRAM = '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P';
const client = new Client(process.env.YELLOWSTONE_GRPC_ENDPOINT!, process.env.YELLOWSTONE_GRPC_TOKEN!, undefined);
await client.connect();
const stream = await client.subscribe();
await stream.write({
transactions: {
pumpfun: {
accountInclude: [PUMP_FUN_PROGRAM],
accountExclude: [],
accountRequired: [],
failed: false,
vote: false,
},
},
accounts: {},
slots: {},
blocks: {},
blocksMeta: {},
entry: {},
accountsDataSlice: [],
transactionsStatus: {},
commitment: CommitmentLevel.PROCESSED,
});
stream.on('data', (update) => {
if (update.transaction) {
const parsed = parsePumpFunTx(update.transaction);
if (parsed?.type === 'create') {
console.log('🚀 New token:', parsed.mint);
console.log(' Name:', parsed.name);
console.log(' Symbol:', parsed.symbol);
}
}
});
Parsing the Create Instruction
Pump.fun's create instruction contains the token metadata encoded in the transaction data. The key fields are the token mint, name, symbol, and URI:
import { BorshInstructionCoder, type Idl } from '@coral-xyz/anchor';
import pumpfunIdl from './idl/pumpfun.json';
const ixCoder = new BorshInstructionCoder(pumpfunIdl as Idl);
const createDisc = Buffer.from(pumpfunIdl.instructions.find((i) => i.name === 'create')!.discriminator);
function parsePumpFunTx(tx: TransactionUpdate) {
const message = tx.transaction?.message;
if (!message) return null;
const allIxs = [
...(message.instructions ?? []),
...(tx.transaction?.meta?.innerInstructions ?? []).flatMap((group) => group.instructions ?? []),
];
for (const ix of allIxs) {
const data = Buffer.from(ix.data);
const matches =
data.length >= 8 &&
(data.subarray(0, 8).equals(createDisc) || data.subarray(0, 8).equals(createV2Disc));
if (!matches) continue;
const decoded = ixCoder.decode(data);
if (decoded?.name !== 'create' && decoded?.name !== 'create_v2') continue;
return {
type: decoded.name,
mint: message.accountKeys[ix.accounts[0]],
name: decoded.data.name,
symbol: decoded.data.symbol,
uri: decoded.data.uri,
};
}
return null;
}
Tracking the Bonding Curve
After a token is created, you can monitor its bonding curve progress to track how close it is to graduating to Raydium:
// Subscribe to Pump.fun account updates for bonding curve data
stream.write({
accounts: {
bondingCurve: {
owner: [PUMP_FUN_PROGRAM],
filters: [],
},
},
slots: {},
blocks: {},
blocksMeta: {},
entry: {},
accountsDataSlice: [],
transactionsStatus: {},
transactions: {},
commitment: CommitmentLevel.PROCESSED,
});
The bonding curve account contains:
- virtualTokenReserves, remaining tokens in the curve
- virtualSolReserves, SOL accumulated
- complete, whether the curve has graduated
Production rules for launch detection
- Filter early, Use gRPC filters to only receive Pump.fun transactions, not all Solana traffic.
- Handle reconnections, gRPC streams will occasionally disconnect. Always implement reconnection logic.
- Validate data, Not every Pump.fun transaction is a create. Check the instruction discriminator.
- Rate limit your actions, Even though you detect tokens fast, executing trades needs proper error handling.
What to build once mint detection works
With real-time Pump.fun detection, you can build:
- Token sniping bots that buy immediately after creation
- Launch monitoring dashboards with live feeds
- Bonding curve trackers that alert when tokens are about to graduate
- Analytics pipelines tracking launch volume and success rates
Solana Tracker's Pump.fun API and Data API provide pre-indexed Pump.fun data including bonding curve status, holder counts, and price history. Combine it with gRPC for the ultimate Pump.fun toolkit.
Download the example
Clone the full runnable project on GitHub, npm install && npm start with your keys in .env. See the tutorial for step-by-step context.
Runnable Node.js project — clone from GitHub, add keys to .env, then npm start. gRPC examples use native dependencies — run locally with Node.js.