Real-time Updates
Stream real-time trading and token creation data by connecting to the PumpSwapApi Websocket at wss://pumpswapapi.fun/api/data.
PLEASE ONLY USE ONE WEBSOCKET CONNECTION AT A TIME: You should NOT open a new Websocket connection for every token or account you subscribe to. Instead, you should send any new subscribe messages to the same connection. Clients that repeatedly attempt to open many websocket connections at once may be blacklisted.
Examples:
You can also unsubscribe from any data stream in the same way, using the following methods:
unsubscribeNewToken
unsubscribeTokenTrade
unsubscribeAccountTrade