subscribe_migrations - migrations
Live feed of pool migration events on the DEXes you pick (today: PumpFun bonding-curve → PumpSwap AMM). Server emits migration. Pass protocols (today only PUMPFUN emits migration events).
| Channel | Socket.IO event |
| Auth | auth.api_key in the handshake |
| Emits | migration |
Example
- JavaScript
- Python
Click an icon to toggle it. The example regenerates live, so you can paste it straight into your client.
socket.on("migration", (m) => {
console.log(`${m.mint} migrated ${m.old_pool} → ${m.new_pool}`);
});
socket.emit("subscribe_migrations", {
protocols: ["PUMPFUN"],
});
import socketio
sio = socketio.Client()
@sio.on("migration")
def on_migration(m):
print(f"{m['mint']} migrated {m['old_pool']} → {m['new_pool']}")
sio.connect("https://api.pumpdata.fun", auth={"api_key": "pd_xxxxxxxx…"})
sio.emit("subscribe_migrations", {"protocols": ["PUMPFUN"]})
sio.wait()
# later, to stop (free):
# sio.emit("unsubscribe_migrations", {"protocols": ["PUMPFUN"]})
Response - migration
{
"protocol": "PUMPFUN",
"mint": "Gc6r…pump",
"old_pool": "<bonding curve>",
"new_pool": "<pumpswap pool>",
"tx": "<signature>",
"time": 1779812627
}
Try it
Notes
- After a migration the old pool is marked
active: falsein/metadata; subsequent lookups bymintresolve to the new pool automatically. - Combine with
subscribe_new_tokensfor the launch side, andsubscribe_tradeson the new pool for the first trades.