> ## Documentation Index
> Fetch the complete documentation index at: https://www.helius.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Pump.fun Token Mints with Parsed Events

> Page through a Solana address's history with Helius Parsed Events and extract Pump.fun create instructions — token mint, creator, name, symbol, and URI.

This guide fetches **every token a wallet has deployed on Pump.fun**. It pages through the wallet's parsed history and picks out the two instructions Pump.fun uses to launch a token, until the history is exhausted.

It is the historical counterpart to the Parsed Streams guide [Track Pump.fun Mints](https://www.helius.dev/docs/parsed-streams/guides/track-pumpfun-mints.md): the same program, the same instruction names, and the same decoded fields — fetched on demand instead of pushed in real time.

**1. Look Up the Program**

Pump.fun launches tokens through two instructions depending on version: `create` and `create_v2`. Parsed Events decodes instructions through the same IDL catalog Parsed Streams uses, so confirm the exact decoded names and account roles with its [`describeProgram`](https://www.helius.dev/docs/parsed-streams/quickstart#discovery) method before matching on them:

```json Request theme={"system"}
{ "jsonrpc": "2.0", "id": 1, "method": "describeProgram", "params": [{ "program": "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P" }] }
```

Check the response's `instructions` list for `create` and `create_v2`, and its `roles` list for the account you want — typically the new **mint** address, and either a `creator` account role or a `creator` field in `args`. The two instruction versions don't necessarily share a shape, which is why the code below checks both an arg and a couple of role names rather than assuming one.

**2. Build the Request**

Fetch the creator wallet's history page by page:

```json theme={"system"}
{
  "address": "<CREATOR_WALLET>",
  "limit": 100,
  "sortOrder": "desc",
  "commitment": "confirmed"
}
```

Three differences from the streaming filter are worth knowing up front:

* `address` is always required — program-wide scans are not supported, so you fetch one wallet's deploys, not every deploy on Pump.fun. For the firehose, use [Parsed Streams](https://www.helius.dev/docs/parsed-streams/guides/track-pumpfun-mints.md).
* Transaction history has no server-side instruction filter. It returns everything the address touched, and you pick out the Pump.fun instructions client-side in the next step. To filter server-side instead, the scan endpoint (`POST /v1/parsed-events/scan`) takes the same fields plus `match.programs`.
* History returns only successful transactions by default (`status: "succeeded"`), so failed deploys, which never produce a live mint, are already left out. Pass `status: "any"` to include them.

**3. Page Through History**

Each result carries **every** instruction of the transaction. Scan `parsed.instructions` for the `create`/`create_v2` hits, and keep passing `paginationToken` back until it disappears:

```javascript pumpfun-mint-history.js theme={"system"}
const API_KEY = process.env.HELIUS_API_KEY;

if (!API_KEY) {
  console.error("Missing HELIUS_API_KEY.");
  process.exit(1);
}

const URL = `https://mainnet.helius-rpc.com/v1/parsed-events/transaction-history?api-key=${API_KEY}`;
const PUMP_PROGRAM = "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P";
const CREATE_INSTRUCTIONS = ["create", "create_v2"];
const CREATOR = process.argv[2];

if (!CREATOR) {
  console.error("Usage: node pumpfun-mint-history.js <CREATOR_WALLET>");
  process.exit(1);
}

async function fetchPage(paginationToken) {
  const body = {
    address: CREATOR,
    limit: 100,
    sortOrder: "desc",
    commitment: "confirmed",
  };
  if (paginationToken) body.paginationToken = paginationToken;

  const response = await fetch(URL, {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify(body),
  });
  if (!response.ok) {
    throw new Error(`HTTP ${response.status}: ${await response.text()}`);
  }
  return response.json();
}

async function main() {
  let paginationToken;
  let deployCount = 0;

  do {
    const page = await fetchPage(paginationToken);

    for (const result of page.data) {
      if (result.parserStatus !== "OK") continue;
      // Failed deploys never produce a live mint.
      if (result.parsed.transactionStatus !== "OK") continue;

      for (const ix of result.parsed.instructions) {
        if (ix.programId !== PUMP_PROGRAM) continue;
        if (!CREATE_INSTRUCTIONS.includes(ix.instructionName)) continue;
        deployCount += 1;
        handleDeploy(result, ix, deployCount);
      }
    }

    paginationToken = page.paginationToken;
  } while (paginationToken);

  console.log(`${deployCount} pump deploys found for ${CREATOR}`);
}

main();
```

**4. Extract Each Deploy**

Pull the mint, creator, and metadata out of the decoded instruction, exactly as the streaming listener does:

```javascript theme={"system"}
// Pull an account pubkey out of a decoded instruction by its role name.
function accountByRole(decoded, role) {
  return decoded?.accounts?.find((a) => a.name === role)?.pubkey ?? null;
}

function handleDeploy(result, ix, deployCount) {
  const args = ix.decoded?.args ?? {};
  const mint = accountByRole(ix.decoded, "mint");
  const creator =
    args.creator ??
    accountByRole(ix.decoded, "creator") ??
    accountByRole(ix.decoded, "user");

  console.log(`pump deploy #${deployCount} (${ix.instructionName})`);
  console.log(`    mint:    ${mint}`);
  console.log(`    creator: ${creator}`);
  console.log(`    name:    ${args.name ?? "?"}`);
  console.log(`    symbol:  ${args.symbol ?? "?"}`);
  console.log(`    uri:     ${args.uri ?? "?"}`);
  console.log(`    slot=${result.parsed.slot} sig=${result.signature}`);
}
```

Check `ix.decoded` is present before trusting `args` and `accounts` — an unrecognized build of the Pump.fun program would otherwise show up as `mint: null`, with only `rawData` and `rawAccounts` to work from.

## Next Steps

> [card] [Track Pump.fun Mints](https://www.helius.dev/docs/parsed-streams/guides/track-pumpfun-mints.md)
>
> The real-time version: a reconnect-safe listener that logs every new deploy as it lands.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.