Jupiter Aggregator V6 is the leading DEX aggregator on Solana, providing optimal swap routes across multiple liquidity sources. This WebSocket stream delivers real-time swap events as they occur on-chain.
Field types for block_num and block_time vary across data streams. Jupiter and Wallet Transfers return these as strings, while Liquidity Pools and Token Creations return them as integers. Always check the type in the response schema for each stream.

WebSocket Endpoint

wss://api.nolimitnodes.com/socket?apikey=YOUR_API_KEY

Subscribe

{
  "method": "dataSubscribe",
  "params": {
    "referenceId": "JUPITER_AGG_V6",
    "streams": [
      {
        "stream": "jupiterAggregatorV6Subscribe",
        "params": {
          "inputMint": "pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn",
          "outputMint": "So11111111111111111111111111111111111111112",
          "amm": "HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq"
        }
      }
    ]
  },
  "id": 1
}

Filter Parameters

inputMint
string
Filter by input token mint address.
outputMint
string
Filter by output token mint address.
amm
string
Filter by AMM address.
inputAmount
number
Filter by input amount.
outputAmount
number
Filter by output amount.
program_id
string
Filter by Jupiter program ID.
All filter parameters are optional. Omit all to receive every Jupiter V6 swap event.

Subscription Confirmation

{
  "status": "Subscribed to jupiterAggregatorV6",
  "subscription_id": "569bb469-569e-47ac-bdef-04bedbd6023f",
  "stream": "jupiterAggregatorV6Subscribe",
  "reference_id": "JUPITER_AGG_V6"
}

Swap Event Response

{
  "method": "jupiterAggregatorV6Subscribe",
  "subscription_id": "569bb469-569e-47ac-bdef-04bedbd6023f",
  "result": {
    "amm": "HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq",
    "inputMint": "pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn",
    "inputAmount": 1273439501,
    "outputMint": "So11111111111111111111111111111111111111112",
    "outputAmount": 42046966,
    "block_num": "366957645",
    "block_time": "1757928580",
    "program_id": "JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4",
    "type": "swap"
  }
}

Response Fields

result
object

Unsubscribe

Request

{
  "method": "dataUnsubscribe",
  "params": {
    "subscriptionIds": ["569bb469-569e-47ac-bdef-04bedbd6023f"],
    "referenceId": "UNSUB_REF"
  }
}

Response

{
  "status": "Unsubscribed",
  "unsubscribed_ids": ["569bb469-569e-47ac-bdef-04bedbd6023f"],
  "reference_id": "UNSUB_REF"
}

Code Examples

const WebSocket = require("ws");

class JupiterWebSocket {
  constructor(apiKey) {
    this.apiKey = apiKey;
    this.ws = null;
    this.swapCount = 0;
    this.totalVolume = {};
  }

  connect() {
    this.ws = new WebSocket(
      `wss://api.nolimitnodes.com/socket?apikey=${this.apiKey}`
    );
    this.setupHandlers();
  }

  setupHandlers() {
    this.ws.on("open", () => {
      console.log("Connected to Jupiter V6 stream");
      this.subscribeToJupiter();
    });

    this.ws.on("message", (data) => {
      const message = JSON.parse(data);
      if (message.method === "jupiterAggregatorV6Subscribe") {
        this.handleJupiterSwap(message.result);
      } else {
        console.log("Info:", JSON.stringify(message));
      }
    });

    this.ws.on("error", (error) => {
      console.error("WebSocket error:", error.message);
    });

    this.ws.on("close", () => {
      console.log("Connection closed. Reconnecting in 5s...");
      setTimeout(() => this.connect(), 5000);
    });
  }

  subscribeToJupiter(filters = {}) {
    this.ws.send(
      JSON.stringify({
        method: "dataSubscribe",
        params: {
          referenceId: "JUPITER_AGG_V6",
          streams: [
            {
              stream: "jupiterAggregatorV6Subscribe",
              params: filters,
            },
          ],
        },
        id: 1,
      })
    );
  }

  handleJupiterSwap(swap) {
    this.swapCount++;

    // Track volume per AMM
    if (!this.totalVolume[swap.amm]) {
      this.totalVolume[swap.amm] = { count: 0, inputTotal: 0, outputTotal: 0 };
    }
    this.totalVolume[swap.amm].count++;
    this.totalVolume[swap.amm].inputTotal += swap.inputAmount;
    this.totalVolume[swap.amm].outputTotal += swap.outputAmount;

    console.log(`\n--- Swap #${this.swapCount} ---`);
    console.log(`AMM: ${swap.amm}`);
    console.log(`Input:  ${swap.inputMint.slice(0, 12)}... (${swap.inputAmount})`);
    console.log(`Output: ${swap.outputMint.slice(0, 12)}... (${swap.outputAmount})`);
    console.log(`Block: ${swap.block_num} | Time: ${swap.block_time}`);
    console.log(`Program: ${swap.program_id}`);
  }
}

// Usage
const jupiter = new JupiterWebSocket("YOUR_API_KEY");
jupiter.connect();

Best Practices

Swap Monitoring & Analysis

  • Track swap volume and frequency per AMM to identify the most active liquidity sources.
  • Monitor input/output ratios to detect price impact and slippage across different routes.
  • Aggregate swap data by token pair to build real-time volume dashboards.
  • Use inputMint and outputMint filters to focus on specific trading pairs of interest.

Performance Optimization

  • Apply filters to reduce message volume and processing overhead in production.
  • Batch process swap events rather than handling each individually for analytics workloads.
  • Implement connection pooling and automatic reconnection logic for high-availability setups.
  • Cache AMM metadata locally to avoid redundant lookups on each swap event.

Risk Management

  • Monitor for unusual swap sizes that may indicate whale activity or market manipulation.
  • Track rapid successive swaps from the same AMM as potential arbitrage or sandwich attacks.
  • Compare swap rates across AMMs to detect pricing anomalies.
  • Set alerts for swaps involving tokens on your watchlist for early detection of significant market moves.