All Resources
Pump.funTypeScript7 min read

How to Stream New Pump.fun Token Launches in Real-Time with Solana gRPC

Detect new Pump.fun token mints the moment they happen using Yellowstone gRPC streaming. Build token sniping and monitoring tools in TypeScript.

pumpfungrpctypescripttoken-launchbonding-curve

Introduction

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.

This guide shows you how to subscribe to Pump.fun's program via Yellowstone gRPC and detect new token mints in real-time using TypeScript.

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.

Subscribing to Pump.fun Events

import { Client } from '@triton-one/yellowstone-grpc';

const PUMP_FUN_PROGRAM = '6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P';

const client = new Client(ENDPOINT, TOKEN);
const stream = await client.subscribe();

await stream.write({
  transactions: {
    pumpfun: {
      accountInclude: [PUMP_FUN_PROGRAM],
      accountExclude: [],
      accountRequired: [],
    },
  },
  commitment: 'confirmed',
});

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 { BorshCoder } from '@coral-xyz/anchor';
import pumpFunIdl from './pump_fun_idl.json';

const coder = new BorshCoder(pumpFunIdl);

function parsePumpFunTx(tx: TransactionUpdate) {
  const message = tx.transaction?.message;
  if (!message) return null;

  for (const ix of message.instructions) {
    try {
      const decoded = coder.instruction.decode(Buffer.from(ix.data));
      if (decoded?.name === 'create') {
        return {
          type: 'create',
          mint: message.accountKeys[ix.accounts[0]],
          name: decoded.data.name,
          symbol: decoded.data.symbol,
          uri: decoded.data.uri,
        };
      }
    } catch { /* not a Pump.fun instruction */ }
  }
  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
await stream.write({
  accounts: {
    bondingCurve: {
      owner: [PUMP_FUN_PROGRAM],
      filters: [],
    },
  },
});

The bonding curve account contains:

  • virtualTokenReserves — remaining tokens in the curve
  • virtualSolReserves — SOL accumulated
  • complete — whether the curve has graduated

Best Practices

  1. Filter early — Use gRPC filters to only receive Pump.fun transactions, not all Solana traffic.
  2. Handle reconnections — gRPC streams will occasionally disconnect. Always implement reconnection logic.
  3. Validate data — Not every Pump.fun transaction is a create. Check the instruction discriminator.
  4. Rate limit your actions — Even though you detect tokens fast, executing trades needs proper error handling.

Building on This

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 Data API provides pre-indexed Pump.fun data including bonding curve status, holder counts, and price history. Combine it with gRPC for the ultimate Pump.fun toolkit.

View the full source code on GitHub.