Skip to main content

Overview

This guide shows you how to listen for pump.fun token creation events in real time using Geyser. In the pumpfun-bonkfun-bot repository, there is the cookbook/pumpfun/listen/pumpfun_listen_tokens_geyser.py script. It demonstrates how to capture the new token’s name, symbol, mint address, user (creator), bonding curve address, and associated bonding curve address—no methods like blockSubscribe extra RPC calls like getTransaction are required. The listener in this repo subscribes to successful transactions that include the pump.fun program and parses only the “Create” instruction (checking the first 8 bytes of instruction data), decoding it to TokenInfo in micro‑seconds.

Implementation details

How the pump.fun bot uses Geyser

  1. Subscription — a single SubscribeRequest is sent with a transaction filter that contains the pump.fun program ID, commitment level, transaction status.
  2. Parsing — every incoming SubscribeUpdate.transaction is checked for the 8‑byte discriminator of the Create instruction.
  3. TokenInfo emission — when found, the platform event parser (PumpFunEventParser for pump.fun) constructs a TokenInfo dataclass (name, symbol, mint, curves, user) and hands it to the existing buyer / seller pipeline.
  4. Trading flow — buy, hold, sell, and optional account cleanup happen exactly as with the WebSocket listeners. No other files need modification.
The only operational difference is that tokens enter the queue earlier, giving the bot a cheaper entry price.

Configuration changes

To switch the bot to Geyser:
  1. Set listener_type: "geyser" under filters in your bot’s .yaml config in the bots/ directory. The bots/bot-sniper-1-geyser.yaml template has it set already.
  2. Add the following to your .env file:
    • GEYSER_ENDPOINT — the gRPC endpoint from Access and credentials > Yellowstone gRPC in host-and-port form, as yellowstone-solana-mainnet.core.chainstack.com:443. The bot uses the Python grpc package, which takes the host and port with no scheme, so drop any https:// prefix and add :443 if the console omits it
    • GEYSER_API_TOKEN — the x-token from the same tab

Benchmarking listeners

Run the benchmark script. It runs for the number of seconds set in TEST_DURATION at the top of tools/compare_listeners.py:
It launches all available types of listeners (blockSubscribe, logsSubscribe, Geyser, and PumpPortal) and records all detected mints. The results of the script are tables with statistics on how many and with which latency mints have been detected by each listener. The absolute numbers depend on your provider and network path, but Geyser is consistently the front‑runner.

Summary

Switching to the Geyser listener is a two‑step change—update .env and set listener_type: "geyser" in your bot’s .yaml config. All higher‑level trading code remains untouched, yet you gain a tangible latency advantage when sniping newly created pump.fun tokens.

About author

Anton Sauchyk

Anton Sauchyk Developer Advocate @ Chainstack
Multiple years of software development and Web3 expertise
Last modified on September 27, 2026