How to stream pump.fun trades in real time over WebSocket
Push pump.fun trades, launches and graduations to your app in real time: create a filtered WebSocket stream on the Raiden API in three steps.
Push pump.fun trades, launches and graduations to your app in real time: create a filtered WebSocket stream on the Raiden API in three steps.
Polling a REST endpoint every second is the wrong tool for live trading — by the time you see the trade, the candle has moved. The Raiden API pushes pump.fun events over WebSocket the moment they land on chain: swaps from wallets you care about, new token launches, graduations and whale flow — filtered server-side, so your client receives only what matters.
A stream is created over REST and describes what you want to receive
(kinds) and whose activity (filters sourced from your saved wallet
lists — never typed inline). It returns an opaque token; you connect to that token over
WebSocket. Available kinds:
| Kind | What gets pushed | Filter |
|---|---|---|
swaps | Every trade by the wallets in your list | wallet_list_id (required) |
creations | New token launches | dev_list_id — omit for ALL new tokens |
grad | Graduations to PumpSwap | — |
dev_score | Dev-reputation updates | — |
feed | Whale flow above a SOL threshold | min_sol (lamports, default 3e9) |
Streams pull their wallet filters from wallet groups — named lists you manage over REST (or by clicking ★ in the Terminal):
# create a group… curl -X POST -H "X-API-Key: $RAIDEN_KEY" -d '{"name":"Snipers"}' \ "https://terminal.raiden.wtf/api/wallet-groups" # → {"id": "grp_5f3a…", "name": "Snipers", …} # …and fill it (idempotent, up to 1000 wallets per group) curl -X POST -H "X-API-Key: $RAIDEN_KEY" \ -d '{"wallets":["8psN…VRtf","Cb3f…g9rE"]}' \ "https://terminal.raiden.wtf/api/wallet-groups/grp_5f3a…/wallets"
curl -X POST -H "X-API-Key: $RAIDEN_KEY" \ -d '{"name":"whales","kinds":["swaps","feed"],"wallet_list_id":"grp_5f3a…","min_sol":3000000000}' \ "https://terminal.raiden.wtf/api/ws-subscriptions" { "id": 3, "token": "sub_a1b2c3…", "name": "whales", "active": true, "kinds": ["swaps", "feed"], "wallet_list_id": "grp_5f3a…", "min_sol": "3000000000" }
token to connect — not the numeric id. Flip
active with a PUT to pause a stream without deleting it.
Authenticate with your API key and the stream token in the query string. Each pushed
event carries a type — swap, token,
graduate or dev_score:
import asyncio, json, websockets URL = "wss://terminal.raiden.wtf/ws?key=YOUR_KEY&sub=sub_a1b2c3…" async def main(): async with websockets.connect(URL) as ws: async for raw in ws: ev = json.loads(raw) if ev["type"] == "swap": side = "BUY " if ev["is_buy"] else "SELL" print(side, ev["trader"][:4], ev["mint"][:4], int(ev["sol_amount"]) / 1e9, "SOL") asyncio.run(main())
Same thing in the browser or Node:
const ws = new WebSocket("wss://terminal.raiden.wtf/ws?key=YOUR_KEY&sub=sub_a1b2c3…"); ws.onmessage = (m) => { const ev = JSON.parse(m.data); if (ev.type === "graduate") console.log("graduated:", ev.mint); };
swaps, and mirror-review every entry in seconds.creations with no dev list = every new pump.fun
token, pushed at creation — enrich each mint with
/tokens/{mint}/pack for an instant risk read.grad events tell you the moment a token
migrates to PumpSwap — the classic volatility window.feed with a high min_sol is a clean
"size is moving" alarm with almost no noise.Events arrive sub-second after the chain — the same pipeline that powers the Terminal's live feed. Full stream reference in the API docs; for the historical side of the same data, start from downloading history with Python. And if the goal is mirroring wallets rather than watching them, the copy-trading bot guide builds the full signal-to-decision loop on top of these streams.
Three per account. Setting a stream up is free; each open connection uses 1 credit per started minute from your API key's credits. Each stream can mix multiple kinds (swaps, creations, grad, dev_score, feed), so one connection often covers a whole strategy.
Sub-second after the trade lands on chain — the stream is fed by the same gRPC pipeline that powers the Terminal's live feed, with filters matched server-side before push.
Update the stream with a PUT on /ws-subscriptions/{id} — it re-resolves your wallet lists. You can also flip active to pause a stream without deleting it.
Build on the same data
Free API key with 200,000 trial credits: full REST and WebSocket access to the same firehose that powers the Terminal. Connect a Solana wallet; no email, no card.