Learn how to use Geyser to stream Solana transactions over gRPC for faster token mint detection compared to logsSubscribe or blockSubscribe methods.
learning-examples/listen_create_from_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.
SubscribeRequest
is sent with a transaction filter that contains the pump.fun program ID, commitment level, transaction status.SubscribeUpdate.transaction
is checked for the 8‑byte discriminator of the Create instruction.GeyserEventProcessor
constructs a TokenInfo
dataclass (name, symbol, mint, curves, user) and hands it to the existing buyer / seller pipeline.LISTENER_TYPE="geyser"
in src/config.py
GEYSER_ENDPOINT
GEYSER_API_TOKEN
.env
and set LISTENER_TYPE="geyser"
in config.py
. All higher‑level trading code remains untouched, yet you gain a tangible latency advantage when sniping newly created pump.fun tokens.