Dexploit is in public beta. Share feedback →

Skip to content
← Back to Blog
solanapumpfunapiwebsockettutorial

How to Get New, Graduating and Graduated Pump.fun Tokens with an API

Dexploit Team··8 min read
How to Get New, Graduating and Graduated Pump.fun Tokens with an API

If you are building a pump.fun sniper, tracker or alert bot, you need three lists: tokens that were just created, tokens whose bonding curve is nearly full, and tokens that just graduated to a tradeable pool. You can read all three from Dexploit with plain HTTP calls or one WebSocket, with no RPC node and no transaction decoding.

This tutorial uses a Free key: 10 requests per second, 10,000 requests a month, 14 days of history, one stream at a time (authentication). Get a key from the dashboard.

The three stages

A pump.fun token starts on a bonding curve. As people buy, the curve fills. When it is full the token graduates: it moves to a normal AMM pool (PumpSwap).

StageWhat it means hereWhere to read it
NewThe token was just createdGET /pump-lifecycle?status=new, WebSocket room latest
GraduatingThe curve is close to full and no graduated event has fired yetGET /tokens/multi/graduating, room graduating
GraduatedThe token moved to a poolGET /tokens/multi/graduated, room graduated

Setup

mkdir pump-watch && cd pump-watch
npm init -y
npm install ws
export DEXPLOIT_API_KEY=your-key-here

REST calls go to https://api.dexploit.dev with an X-API-Key header. The scripts use .mjs files and the built-in fetch, so you need Node 18 or newer.

Step 1: the three lists over REST

Save this as rest.mjs:

const BASE = "https://api.dexploit.dev";
const KEY = process.env.DEXPLOIT_API_KEY;
if (!KEY) {
  console.error("Set DEXPLOIT_API_KEY first");
  process.exit(1);
}

async function get(path) {
  const res = await fetch(BASE + path, { headers: { "X-API-Key": KEY } });
  if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
  return res.json();
}

const short = (mint) => mint.slice(0, 6) + "…" + mint.slice(-4);
const ago = (ts) => `${Math.round(Date.now() / 1000 - ts)}s ago`;

// 1. New pump.fun mints (lifecycle feed, status=new)
const fresh = await get("/pump-lifecycle?status=new&limit=5");
console.log("NEW");
for (const e of fresh.events) console.log(" ", short(e.mint), "created", ago(e.ts));

// 2. Curves close to graduating (bonding_pct is 0-100 on this endpoint)
const soon = await get("/tokens/multi/graduating?limit=5");
console.log("GRADUATING");
for (const t of soon.results) console.log(" ", short(t.mint), t.bonding_pct.toFixed(1) + "%");

// 3. Tokens that already graduated
const done = await get("/tokens/multi/graduated?limit=5");
console.log("GRADUATED");
for (const t of done.results) console.log(" ", short(t.mint), "graduated", ago(t.graduated_at));

Run node rest.mjs. A live run printed:

NEW
  FhJRPJ…pump created 1s ago
  FqMVWg…JCho created 2s ago
  Dve8Jz…pump created 5s ago
GRADUATING
  4Zo28q…pump 100.0%
  7dnVH3…pump 88.8%
  wCGGuR…pump 86.4%
GRADUATED
  BwqRkH…pump graduated 79s ago
  8uLNcr…pump graduated 170s ago
  4m7dye…pump graduated 182s ago

(The real output has five rows per list; three are shown.) The same data with curl:

curl -H 'X-API-Key: '"$DEXPLOIT_API_KEY" 'https://api.dexploit.dev/tokens/multi/graduating?limit=5'

Each token row also carries name, symbol, creator (it is null when the creator is unknown, never a guess), created_at and social links. Names, symbols and images are chosen by whoever created the token, so treat them as untrusted text.

Want new tokens from every venue, not just pump.fun? GET /tokens/latest lists the newest tokens across all supported DEXes (reference). A TypeScript tour of all four routes is in the get-new-tokens example.

Four gotchas (all checked on the live API)

WhereFieldScale
GET /tokens/multi/graduatingbonding_pct0 to 100
GET /pump-lifecyclebonding_pct0 to 1
WebSocket graduating roombonding_pct0 to 1
WebSocket latest roomts_msmilliseconds (every other ts is seconds)

Two more:

  • On /pump-lifecycle the valid status values are new, completing (the same as graduating) and migrated. status=graduated returns a 400, because the feed calls graduated tokens migrated.
  • A token can sit at 100% in the graduating list for a moment: the curve is full but the graduated event has not fired yet.

For history, /pump-lifecycle pages backwards: pass the next_before_ts from one response as before in the next (reference). The pump-lifecycle-history example pages back through the feed and counts events per hour.

Step 2: stay live with the WebSocket rooms

Polling these lists works for a snapshot, but on a Free key 10,000 requests a month is about one request every four minutes. For anything live, use the rooms on the swaps WebSocket instead. Save this as rooms.mjs:

import WebSocket from "ws";

const KEY = process.env.DEXPLOIT_API_KEY;
const ws = new WebSocket("wss://ws.dexploit.dev/ws/swaps", {
  headers: { Authorization: `Bearer ${KEY}` },
});
const short = (mint) => mint.slice(0, 6) + "…" + mint.slice(-4);

ws.on("open", () => {
  for (const room of ["latest", "graduating", "graduated"]) {
    ws.send(JSON.stringify({ type: "join", room }));
  }
});

ws.on("message", (raw) => {
  const msg = JSON.parse(raw.toString());
  if (msg.type !== "message") return; // skip "joined" acks and anything that is not room data
  const d = msg.data;
  if (msg.room === "latest") console.log("NEW       ", short(d.mint), "first seen on", d.dex);
  if (msg.room === "graduating") console.log("GRADUATING", short(d.mint), (d.bonding_pct * 100).toFixed(1) + "%");
  if (msg.room === "graduated") console.log("GRADUATED ", short(d.mint), "->", d.dex, short(d.new_pool));
});

// keep-alive: the server answers {"type":"pong"}
setInterval(() => {
  if (ws.readyState === WebSocket.OPEN) ws.send(JSON.stringify({ type: "ping" }));
}, 30000);

ws.on("close", (code) => console.log("closed", code));
ws.on("error", (err) => console.error("error:", err.message));

Run node rooms.mjs. A live run printed:

NEW        EmTUad…pump first seen on pumpfun
NEW        CKsxRo…pump first seen on pumpfun
NEW        TPzF73…wtj3 first seen on pumpswap
GRADUATED  GN45Cy…pump -> pumpswap 3qcTi8…V3W9
NEW        7bLE69…PBib first seen on meteora_damm_v2

Notes on what you are reading:

  • latest is every new token on any venue, not only pump.fun. The dex field tells you where it was first seen, so filter on pumpfun if that is all you want.
  • Room messages are wrapped. Every room frame is { "type": "message", "room": "...", "data": { ... } }, and the payload is in data. The code above ignores everything that is not a message, including the joined acknowledgement.
  • The three payloads differ. A graduating frame is { mint, ts, bonding_pct }. A graduated frame is { mint, new_pool, dex, ts }. A latest frame carries the mint, the dex, the pool_address and the first swap (first_swap_signature, first_swap_trader, first_swap_slot) and ts_ms.
  • Rooms or filters, not both. On one connection, the first join locks it into rooms and the first subscribe locks it into filters. Free accounts can join up to 5 rooms (rooms reference).
  • Free means one stream. A second connection with the same key is refused until the first closes (streaming caps).

How soon an event reaches you depends on your network and host, so measure it from where you will run the code before you build a strategy on it. A ready-made TypeScript version of this script, where you pick the rooms from the command line, is the pump-token-launches example.

Step 3: from a graduated token to its pool

A graduated token has two pools: the old bonding curve and the new AMM pool. Save this as graduated.mjs:

const BASE = "https://api.dexploit.dev";
const headers = { "X-API-Key": process.env.DEXPLOIT_API_KEY };

async function get(path) {
  const res = await fetch(BASE + path, { headers });
  if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
  return res.json();
}

// newest graduated token
const { results } = await get("/tokens/multi/graduated?limit=1");
const mint = results[0].mint;

// a graduated token has two pools: the old bonding curve and the new AMM pool
const pairs = (await get(`/api/v1/pairs?token_address=${mint}`)).data;
console.log(pairs.map((p) => `${p.protocol} (${p.status})`).join(", "));

// pick by status, not by position in the list
const pool = pairs.find((p) => p.status === "active");
if (!pool) {
  console.log("no active pool indexed for this token yet");
} else {
  const candles = (await get(`/api/v1/candles/latest?pair_address=${pool.pair_address}&timeframe=1m&limit=5`)).data;
  for (const c of candles.sort((a, b) => a.timestamp.localeCompare(b.timestamp))) {
    console.log(c.timestamp, `${(c.volume_sol / 1e9).toFixed(3)} SOL`, `${c.trade_count} trades`);
  }
}

Run node graduated.mjs. A live run printed:

pumpswap (active), pumpfun (migrated)
2026-11-12T02:12:00+00:00 0.037 SOL 21 trades
2026-11-12T02:13:00+00:00 0.010 SOL 6 trades

A TypeScript version with the same logic is the pump-graduated-to-pool example. Candle endpoints take a pool address (pair_address), not a mint (pairs vs tokens). Here the list had two rows: the AMM pool with status: "active" and the old curve with status: "migrated". Pick the pool by its status, not by its position in the list: in this run the active pool was listed first even though the old curve had more recent volume. volume_sol is in lamports, so divide by 1,000,000,000 for SOL.

Things worth knowing before you build on it

  • A token can show up in the lifecycle feed before it has any swaps indexed. /pairs can come back empty for a token that just graduated. The script above handles that case; yours should too.
  • Only swaps where one side is SOL are indexed. Pump.fun is SOL-native, so this rarely matters here (coverage).
  • Over the rate limit you get a 429 with Retry-After: 1. Wait that long and retry.
  • REST lists are snapshots. Use the WebSocket rooms when you need to react.

Next