WebSocket Streams

Documentation
API Reference

Everything you need to integrate Dritan's low-latency Solana market data into your trading infrastructure.

DocsAPI ReferenceWebSocket Streams
API Reference

WebSocket Streams

Real-time market data streams

Core streams are WebSocket endpoints (regional):

StreamPath
PumpSwap/pumpamm
Pump.fun/pumpfun
Moonit/moonit
Raydium LaunchLab/launchlab
Raydium AMM v4/amm
Raydium CPMM/cpmm
Raydium CLMM/clmm
Orca Whirlpools/orca
Meteora DBC (Dynamic Bonding Curve)/dbc
Meteora DLMM/dlmm
Meteora DAMM v2/damm2
Meteora DAMM v1/damm1
Wallet Stream/wallet-stream

Each connection counts against your plan's connection limit.

Connect (browser)#

const ws = new WebSocket("wss://us-east.dritan.dev/pumpamm?apiKey=YOUR_KEY");

ws.onopen = () => console.log("open");
ws.onmessage = (m) => console.log(m.data);
ws.onclose = () => console.log("closed");

Connect (Node.js)#

import WebSocket from "ws";

const ws = new WebSocket("wss://us-east.dritan.dev/damm1", {
  headers: { "x-api-key": "YOUR_KEY" }
});

ws.on("message", (m) => console.log(m.toString()));

Connect (SDK)#

import { DritanClient, type DexStreamPoolPayload } from "dritan-sdk";

const client = new DritanClient({ apiKey: "YOUR_KEY" });
const handle = client.streamDex<DexStreamPoolPayload>("pumpamm", {
  onMessage: (event) => {
    console.log(
      event.poolId,
      event.pricePerCoinUsd,
      event.liquidity.totalLiquiditySolana,
      event.liquidity.totalLiquidityUsdc
    );
  }
});

// Close after 10 seconds
setTimeout(() => handle.close(), 10_000);

Wallet subscriptions#

/wallet-stream uses method messages:

  • subscribeWallets
  • unsubscribeWallets
  • listSubscriptions
import { DritanClient, type WalletStreamEnvelope } from "dritan-sdk";

const client = new DritanClient({ apiKey: "YOUR_KEY" });
const walletHandle = client.streamWallets<WalletStreamEnvelope>({
  wallets: ["FV1r15rbNKkJanXLheoJA7fXEq6NDuMJ3bukXuhJWyV1"],
  onMessage: (event) => {
    if (event.type === "message" && event.data) {
      console.log(event.data.wallet, event.data.type, event.data.tx);
    }
  }
});

walletHandle.subscribeWallets(["7Y...AnotherWallet"]);
walletHandle.unsubscribeWallets(["7Y...AnotherWallet"]);
walletHandle.listSubscriptions();

Example wallet stream payload#

{
  "type": "message",
  "data": {
    "tx": "5K8Hv...",
    "wallet": "FV1r15rbNKkJanXLheoJA7fXEq6NDuMJ3bukXuhJWyV1",
    "time": 1760272205000,
    "slot": 398134973,
    "type": "swap",
    "solDelta": -0.00001,
    "feeSol": 0.00001,
    "balances": {
      "sol": {
        "pre": 14.221,
        "post": 14.22099,
        "delta": -0.00001
      },
      "tokens": [
        {
          "mint": "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv",
          "tokenAccount": "8Jf6JxqWDW1JpGbAWf6E6cXJY22gNbEzM7r4rZn3rP8Q",
          "pre": 33320.37,
          "post": 0,
          "delta": -33320.37
        },
        {
          "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
          "tokenAccount": "5Q544fKrFoe6tsEb4QmQxjvCZXFv6TkxMVTscgt2hN6E",
          "pre": 0,
          "post": 751.75,
          "delta": 751.75
        }
      ]
    },
    "from": {
      "address": "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv",
      "amount": 33320.37,
      "token": {
        "address": "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv",
        "amount": -33320.37,
        "decimals": 6,
        "raw": "-33320371522"
      }
    },
    "to": {
      "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "amount": 751.75,
      "token": {
        "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "amount": 751.75,
        "decimals": 6,
        "raw": "751752741"
      }
    },
    "tokenDeltas": [
      {
        "address": "2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv",
        "amount": -33320.37,
        "decimals": 6,
        "raw": "-33320371522"
      },
      {
        "address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
        "amount": 751.75,
        "decimals": 6,
        "raw": "751752741"
      }
    ],
    "volume": {
      "usd": 751.75
    }
  }
}

Example DEX stream payload#

{
  "poolId": "As4zRRuMsgUkqRWsmVxu9syudqpgDWAmWxz8ZUBBDn1b",
  "mints": {
    "base": "4AjvPXMn8YZG9saAVJvcWspg73oTFf2JmU4in4Xgpump",
    "quote": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
  },
  "decimals": { "base": 6, "quote": 6 },
  "marketCap": 325217.1661108281,
  "pricePerCoin": 0.00032521717971233257,
  "liquidity": {
    "basePooled": 671975.749165,
    "quotePooled": 218.538055,
    "totalLiquiditySolana": 437.07611,
    "totalLiquidityUsdc": 437.07611
  },
  "pricePerCoinUsd": 0.00032521717971233257,
  "tokenSupply": 999999958.177165,
  "reserves": {
    "base": 671975749165,
    "quote": 218538055
  },
  "slot": 398134973
}
Last updated: 2/25/2026Edit on GitHub