NoLimitNodes
PricingDocsBlogAbout
SupportContact
Log in
Blog/Guides

Pump.Fun WebSocket: Build a Real-Time Crypto Trading Bot with NoLimitNodes Price Data

This tutorial shows you how to stream live pump.fun trade and token-creation data over a WebSocket from NoLimitNodes, with working JavaScript and Python examples.

N
NoLimitNodes Team
Community & Tutorials
Dec 20, 2024updated Jun 9, 20264 min read
On this page +
  • 01A Quick History (skip this if you're in a hurry)
  • 02So what do we have?
  • 03Registering An Account
  • 04Setting Up the Web Socket Connection
  • 05How To Actually Use It
  • 06Example Integration Code
  • 07Key Notes
  • 08Conclusion
Pump.Fun WebSocket: Build a Real-Time Crypto Trading Bot with NoLimitNodes Price Data

This tutorial shows you how to stream live pump.fun trade and token-creation data over a WebSocket from NoLimitNodes, with working JavaScript and Python examples. If you're building a trading bot, you can have real price data flowing in about ten minutes.

A Quick History (skip this if you're in a hurry)

Getting access to rich pump.fun data is harder than it should be. I wanted to grab pump.fun data and get some bots going, and I spent hours looking for something affordable that would let me get straight to writing trading logic. I found nothing usable.

So I bit the bullet and parsed Solana's raw block data myself. Thousands of lines of code later, I had something reliable and stable enough that I could stop worrying about the pump.fun infrastructure layer and focus on the bot itself.

I shared that code with my team at NoLimitNodes.com and we productized it, so bot builders like you don't have to go through the same grind. You get to skip straight to the part you do best: building the bot.

So what do we have?

You're probably asking, "So what kind of data do you actually have?" Everything useful that pump.fun emits on the blockchain, delivered in a human-readable format. That last part matters more than it sounds.

This is what the Solana gives you if you were querying directly from the blockchain.

You get real-time access to:

  1. Every token the moment it gets created on pump.fun (useful if you want to be among the very first into a coin as it launches)
  2. Every buy/sell transaction along with price data, for a single token (when you only care about one coin) or for all tokens at once
  3. Token information as soon as it graduates to Raydium

In short, anything your bot could reasonably need is covered.

Let's start coding by first getting you a 100% free NoLimitNodes API key.

Registering An Account

Head over to nolimitnodes.com and click Start Building to create an account.

Once you've registered, click the Get button to claim your free API key.

You should then see your generated key.

Copy it and keep it handy. You'll need it for the rest of this tutorial.

Setting Up the Web Socket Connection

Endpoint:

Your pump.fun WebSocket endpoint looks like this:

wss://api.nolimitnodes.com/pump-fun?api_key=YOUR_API_KEY

Replace YOUR_API_KEY with your own key.

How To Actually Use It

1. Listening to Trade (Buy/Sell) Transactions

Subscribe:

To subscribe to trade transactions for a specific coin:

{
    "method": "pumpFunTradeSubscribe",
    "params": {
        "coinAddress": "abcxxx...pump",
        "referenceId": "REF#1"
    }
}

To do the same for all coins:

{
    "method": "pumpFunTradeSubscribe",
    "params": {
        "coinAddress": "all",
        "referenceId": "REF#1"
    }
}

Note: The referenceId is just a string you choose; it's echoed back so you can match responses to the requests that triggered them.

Response:

{
  "status": "Trade Subscribed",
  "subscription_id": "9d4a3756-f3de-464d-ae05-c36297984f90",
  "reference_id": "REF#1"
}

Unsubscribe:

To stop receiving trade transactions for a specific coin or all coins:

{
    "method": "pumpFunTradeUnsubscribe",
    "params": {
        "subscriptionId": "9d4a3756-f3de-464d-ae05-c36297984f90"
    }
}

Response:

{
  "status": "Trade Event Unsubscribed",
  "subscription_id": "9d4a3756-f3de-464d-ae05-c36297984f90"
}

2. Listening to Create Events Transactions

Subscribe:

To subscribe to create events for coins or LPs:

{
    "method": "pumpFunCreateEventSubscribe",
    "params": {
        "eventType": "coin" // or "lp" or "all",
        "referenceId": "REF#1"
    }
}

Response:

{
    "status": "Create Event Subscribed",
    "subscription_id": "9c37a3e8-d39b-497c-902d-162e19a0bcda",
    "reference_id": "REF#1"
}

Note: Same deal as before: referenceId is an arbitrary string used to correlate requests with their responses.

Unsubscribe:

To stop receiving create events for coins or LPs:

{
    "method": "pumpFunCreateEventUnsubscribe",
    "params": {
        "subscriptionId": "9c37a3e8-d39b-497c-902d-162e19a0bcda",
    }
}

Response:

{
    "status": "Create Event Unsubscribed",
    "subscription_id": "9c37a3e8-d39b-497c-902d-162e19a0bcda"
}

Example Integration Code

JavaScript Implementation

Here's a working integration in JavaScript:

const WebSocket = require('ws');

const socket = new WebSocket('wss://api.nolimitnodes.com/pump-fun?api_key=YOUR_API_KEY');

socket.on('open', () => {
    console.log('Connected to pump.fun WebSocket');

    // Subscribe to trade transactions for all coins
    const subscribeMessage = {
        method: "pumpFunTradeSubscribe",
        params: {
            coinAddress: "all",
            referenceId: "REF#1"
        }
    };

    socket.send(JSON.stringify(subscribeMessage));
});

socket.on('message', (data) => {
    console.log('Received data:', JSON.parse(data));
});

socket.on('close', () => {
    console.log('Disconnected from WebSocket');
});

socket.on('error', (error) => {
    console.error('WebSocket error:', error);
});

Python Implementation

And the same thing in Python:

import websocket
import json

def on_open(ws):
    print("Connected to pump.fun WebSocket")

    # Subscribe to trade transactions for all coins
    subscribe_message = {
        "method": "pumpFunTradeSubscribe",
        "params": {
            "coinAddress": "all",
            "referenceId": "REF#1"
        }
    }
    ws.send(json.dumps(subscribe_message))

def on_message(ws, message):
    print("Received data:", json.loads(message))

def on_close(ws, close_status_code, close_msg):
    print("Disconnected from WebSocket")

def on_error(ws, error):
    print("WebSocket error:", error)

socket_url = "wss://api.nolimitnodes.com/pump-fun?api_key=YOUR_API_KEY"

ws = websocket.WebSocketApp(socket_url, 
                            on_open=on_open,
                            on_message=on_message,
                            on_close=on_close,
                            on_error=on_error)
ws.run_forever()

Key Notes

  1. Dynamic Coin Selection: Replace abcxxx...pump with the coin address you want to monitor, or pass "all" to listen to every coin.
  2. Event Type Options:
    • For trade transactions, use pumpFunTradeSubscribe or pumpFunTradeUnsubscribe.
    • For create events, use pumpFunCreateEventSubscribe or pumpFunCreateEventUnsubscribe.
  3. Real-Time Updates: Events arrive over the open socket as they happen; there's no polling involved.

Conclusion

The pump.fun WebSocket endpoint from nolimitnodes.com gives you a direct line to trade and create events without parsing raw block data yourself.

You now have the endpoint, the subscription formats, and example code in two languages. Wire the stream into your trading logic and you're running on live data.

#solana#pumpfun#websocket#trading#tutorial
N
NoLimitNodes Team
Community & Tutorials

Tutorials, market notes, and product walkthroughs from across the NoLimitNodes team.

On this page
  • 01A Quick History (skip this if you're in a hurry)
  • 02So what do we have?
  • 03Registering An Account
  • 04Setting Up the Web Socket Connection
  • 05How To Actually Use It
  • 06Example Integration Code
  • 07Key Notes
  • 08Conclusion
↑ back to top
///Read next
GuidesJun 19, 2026

Yellowstone gRPC in Python (2026): Setup, 5 Core Patterns & a Real-Time PumpFun Detector

A complete Python guide to Yellowstone gRPC: proto generation, a reusable auth helper, five working patterns from wallet watcher to memcmp filter, a full PumpFun token-launch detector, and production reconnect with exponential backoff.

#yellowstone#grpc#python
18 min read
GuidesMay 19, 2026

Yellowstone gRPC vs WebSockets: choosing a real-time Solana data pipeline

Both transports stream the same chain, but they come from different places inside the validator and fail in different ways. A field guide to choosing and operating the right pipeline for your workload.

#yellowstone#grpc#websocket
16 min read
← Older
Get started with Solana RPC node using nolimitnodes.com
Newer →
Pump.Fun Websocket Tutorial - Get A Realtime Token Stream Of Newly Launched Tokens
Run it yourself

Every benchmark in this blog runs against our public endpoints.

Spin up an RPC, WebSocket, or gRPC endpoint in under a minute. Flat pricing, no request caps. Reproduce the numbers for your own workload.

See pricing

Ready to get started?

Get your free API key and start building in under 30 seconds.

Talk to Sales
NoLimitNodes

Solana RPC infrastructure built for performance and scale.

RPC Access
  • HTTP RPC
  • WebSocket
  • gRPC
Infrastructure
  • Compute Platform
  • VPS
  • VDS
  • Bare Metal
  • Geyser Plugin Hosting
Enhanced Streams
  • PumpFun
  • PumpSwap
  • Raydium
  • Orca
  • Meteora
  • System Events
  • Browse All →
Program Streams
  • PumpFun
  • PumpSwap
  • Raydium CLMM
  • Orca Whirlpool
  • Meteora DLMM
  • Jupiter Swap
  • Jupiter Perps
  • Kamino Lending
  • Browse All 37 →
Trading
  • EZWallet
Analytics
  • Historical Datasets
  • Historical Raw Blocks
Company
  • About
Resources
  • Pricing
  • Custom Development
  • Documentation
  • Blog
  • Support
  • Contact Sales
Compare
  • Yellowstone gRPC vs LaserStream
  • Triton vs Helius
  • Raydium API vs Helius
  • PumpSwap API vs Bitquery
  • QuickNode Streams vs NLN
  • All comparisons →
Legal
  • Terms & Conditions
  • Privacy Policy
© 2026 CLR3 Inc., operating as NoLimitNodes. Registered in Ontario, Canada. All rights reserved.solana mainnet