- Explain what a WebSocket, a gRPC stream and a decoded stream each deliver for one Pump.fun trade
- Estimate the decoding work each option leaves you
- Pick a feed for a prototype, a trading bot or a dashboard
In this lesson
If you want to follow Pump.fun as it happens, whether that means new tokens, buys and sells, or graduations, there are three ways to get the data: a WebSocket subscription, a Yellowstone gRPC stream, or a decoded stream that hands you typed events. All three see the same transactions. They differ in how much of each transaction you receive and how much decoding you have to do yourself.
01What you are trying to catch#
Every Pump.fun token goes through the same life cycle, and each stage is a transaction on the Pump.fun program (6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P):
- Create. A new mint and its bonding curve account are set up, with a name, symbol and metadata URI.
- Trade. Buys and sells against the bonding curve. The price moves with the curve's virtual reserves after every trade.
- Graduate. When the curve completes, its liquidity moves to a PumpSwap pool and trading continues there, on a different program.
For each event you usually want the same handful of fields: the mint, the wallet, the SOL and token amounts, and the reserves after the trade. The question is how much work stands between the raw transaction and those fields.
02At a glance#
03Option 1: WebSocket logsSubscribe#
The standard Solana WebSocket API has a logsSubscribe method. Pass the Pump.fun program in mentions and you get a notification for every transaction that touches it. Each notification holds the signature, an error field, and the program log lines. Log lines name the instruction (Instruction: Buy, Instruction: Create), so you can tell what kind of event happened.
Logs don't carry clean amounts, mints or wallets. To get those you call getTransaction with the signature, which costs an RPC request per event and adds a round trip. On a busy day that's a lot of requests. Solana also truncates very long logs, so a complex transaction can arrive with lines missing.
- +Standard API, works with any provider
- +Runs in a browser or a small script
- +Easy to start: one JSON message
- −No amounts or mints without a follow-up getTransaction
- −Log parsing breaks when log text changes
- −Missed events need a backfill after every drop
04Option 2: Yellowstone gRPC#
A Yellowstone gRPC stream with a transaction filter on the Pump.fun program sends you the whole transaction: account keys, instructions, inner instructions, token balances before and after, and logs. Nothing needs a follow-up call. Filtering happens on the server, so you only receive Pump.fun transactions.
The catch is that instruction data arrives as bytes. To turn it into “wallet X bought Y tokens for Z SOL”, you match the first eight bytes against each instruction's Anchor discriminator, then deserialize the rest using the program's IDL. For accurate post-trade reserves you also decode the event data the program emits. When Pump.fun changes its instructions, for example by adding fields such as creator fees, your decoder has to change with it.
- +Complete transactions, no follow-up RPC calls
- +Server-side filters keep bandwidth down
- +Binary encoding holds up at high volume
- −You write and maintain the decoders
- −Needs a gRPC client and protobuf types
- −Not usable from a browser
New to gRPC? Build your first Yellowstone gRPC client before you take this on.
05Option 3: A decoded stream#
A decoded stream does the decoding on the server and sends one event per action, with named fields. On NoLimitNodes, PumpFun Data has four topics: create, trade, graduate and transaction. A trade event includes the mint, the wallet, is_buy, SOL and token amounts, virtual and real reserves after the trade, and the fees, along with the slot and signature.
Graduations are where a decoded feed saves the most work. A graduate event carries the mint, the SOL and token amounts moved to the pool, and the new pool address. Trading then moves to PumpSwap, which has its own PumpSwap stream, so you can follow a token from launch through its time on the AMM.
- +No decoders to write or update
- +Every event already has amounts, mint and wallet
- +Fastest path to a working bot or dashboard
- −Limited to the topics and fields the provider offers
- −Another layer between you and the raw chain
- −Provider-specific client code
06What decoding yourself really costs#
Teams usually underestimate the decoder work. Writing it once is a day or two. Keeping it right is the ongoing cost:
- Program upgrades. New instructions or fields need a decoder change, ideally before the first transaction that uses them reaches you.
- Inner instructions. Many Pump.fun trades arrive through routers and bots, so the call you care about is an inner instruction, not a top-level one. Your decoder has to walk both.
- Two programs. After graduation the token trades on PumpSwap, which has its own IDL and its own events.
- Raw units. Amounts are integers in lamports and raw token units, so you need the mint decimals to show prices.
None of this is hard on its own. It is just work that never ends, and a decoded stream moves it to the provider.
07How to choose#
- Just exploring, or running in a browser? Start with WebSocket
logsSubscribe. You'll see activity within minutes. - Need amounts, wallets and reserves on every event? Skip WebSocket. A follow-up lookup per trade does not scale.
- Need fields nobody decodes, or already decode many programs? Use Yellowstone gRPC and own the decoders.
- Otherwise, use a decoded stream and spend your time on strategy rather than parsing.
Whichever feed you choose, you still need RPC to load token metadata, fetch blockhashes and send your own transactions. For history rather than live data, the Pump.fun historical archive and our PumpFun graduations SQL workbook cover past launches.
Q1You use logsSubscribe on the Pump.fun program. What do you need to do to learn the SOL amount of a trade?
Q2What does a Yellowstone gRPC transaction filter on the Pump.fun program give you that WebSocket logs do not?
Q3A Pump.fun token graduates. Where does its trading continue?
Frequently asked questions#
Is there a PumpFun WebSocket API?
Pump.fun runs on Solana, so any Solana WebSocket endpoint works: call logsSubscribe with the Pump.fun program in mentions. You get each transaction's signature and logs, then fetch the transaction to read amounts and mints.
What is the fastest way to detect new Pump.fun tokens?
Among these three, gRPC and decoded streams are the practical choices because they deliver complete data without a follow-up lookup. Raw shreds see transactions earlier still, but you decode them yourself and some never confirm.
Do I need the Pump.fun IDL?
Only if you decode transactions yourself, as with WebSocket lookups or Yellowstone gRPC. A decoded stream has already applied the IDL and sends named fields.
How do I follow a token after it graduates?
Watch for the graduation event, note the new pool address, then follow that pool on PumpSwap. PumpSwap is a separate program with its own instructions.