Live data (websocket)
New coins, graduations and trades the moment they happen.
Open one websocket and subscribe to what you need.
WSwss://api.trenchytools.lol/api/sol/data
| Send | You receive |
|---|---|
{"method":"subscribeNewToken"} | Every new pump.fun coin |
{"method":"subscribeMigration"} | Every coin that graduates to PumpSwap |
{"method":"subscribeTokenTrade","keys":["MINT"]} | Every trade on these coins |
{"method":"subscribeAccountTrade","keys":["WALLET"]} | Every trade by these wallets (copy-trading) |
To stop, send the same message with unsubscribe… instead of subscribe….
const ws = new WebSocket('wss://api.trenchytools.lol/api/sol/data?api-key=YOUR_API_KEY')
ws.onopen = () => {
ws.send(JSON.stringify({ method: 'subscribeNewToken' }))
}
ws.onmessage = (msg) => {
const e = JSON.parse(msg.data)
if (e.txType === 'create') {
console.log('new coin', e.symbol, e.mint, 'dev bought', e.solAmount, 'SOL')
// follow its trades too
ws.send(JSON.stringify({ method: 'subscribeTokenTrade', keys: [e.mint] }))
} else if (e.txType === 'buy' || e.txType === 'sell') {
console.log(e.txType, e.solAmount, 'SOL by', e.traderPublicKey)
}
}
Event examples
Response
// new coin
{ "txType": "create", "signature": "…", "mint": "…pump", "traderPublicKey": "…",
"name": "MoonGoat", "symbol": "MGOAT", "uri": "https://ipfs.io/ipfs/…", "pool": "pump",
"initialBuy": 2560000, "solAmount": 0.077, "marketCapSol": 28.1 }
// trade
{ "txType": "buy", "signature": "…", "mint": "…pump", "traderPublicKey": "…",
"tokenAmount": 291577.9, "solAmount": 0.01, "marketCapSol": 33.6, "pool": "pump" }
New coins and graduations are free. Trade streams need your API key in the URL.
Migration events
subscribeMigration delivers two moments per coin: txType: "complete" when the bonding curve fills (trading on the curve stops), then txType: "migrate" when pump.fun creates the PumpSwap pool, with poolAddress. Trade on PumpSwap (pool: "pump-amm" or "auto") from the second one on.
Migration
{ "txType": "migrate", "signature": "…", "mint": "…", "pool": "pump-amm", "poolAddress": "…", "slot": 3812, "ts": 1760000000000 }
Our feed subscribes upstream to exactly what connected clients ask for (creates, migrations, the mints and wallets you watch), straight from our own node. Subscribe to what you need; nothing is sampled or throttled.