The Pump.fun API: How to Get Pump.fun Data for Your App

Pump.fun does not offer a public data API. This guide shows how to get Pump.fun token data through the Codex API, including new launches, real-time prices, trading activity, and graduation tracking.

Illustration of Pump.fun token data flowing through an API — a glowing pill capsule emits streams of structured blockchain data including token prices, wallet addresses, and trading activity against a dark background with chartreuse green accents.

Pump.fun is the biggest memecoin launchpad on Solana. Thousands of new tokens launch on it every day, generating millions in trading volume. If you are building a trading bot, analytics dashboard, or token scanner, you need programmatic access to this data.

The problem: Pump.fun does not offer a public data API. If you want to track new token launches, get real-time prices, or monitor trading activity, your options are scraping their frontend, running your own Solana indexer, or piecing together data from multiple fragmented sources. None of these scale, and all of them break.

This guide shows how to get Pump.fun token data through the Codex API, including new launches, real-time prices, trading activity, and graduation tracking. Every code example uses the Codex TypeScript SDK and can be copy-pasted into a working project.

What Data Is Available for Pump.fun Tokens?

Before diving into code, here is what you can actually access for Pump.fun tokens through an API:

  • New token launches: token address, name, symbol, creator, timestamp, and initial liquidity
  • Real-time USD pricing: current price for any Pump.fun token, calculated across all liquidity sources
  • Trading activity: individual buy and sell transactions, maker addresses, timestamps, and USD values
  • Holder data: top holders, holder count, and wallet balances for any token
  • Token metadata: name, symbol, image URL, and social links
  • Liquidity and market cap: current pool liquidity and fully diluted market cap
  • Graduation tracking: whether a token has migrated from the Pump.fun bonding curve to Raydium, including the Raydium pool address
  • Bonding curve progress: the graduationPercent field shows how close a token is to graduating (0-100%)

That last point is worth highlighting. Graduation, when a token fills its bonding curve and migrates liquidity to Raydium, is one of the most important events in a Pump.fun token's lifecycle. Being able to track graduation progress programmatically is critical for any serious token scanner or bot.

Getting Started: Setup

You need three things to start pulling Pump.fun data.

1. Get a free API key

Sign up at https://dashboard.codex.io/signup. The free tier gives you 10,000 requests per month, enough to build and test a Pump.fun scanner without paying anything.

2. Install the SDK

npm install @codex-data/sdk

3. Initialize the client

import { Codex } from "@codex-data/sdk";

const sdk = new Codex("YOUR_API_KEY");

One thing you will need for every query: Solana's network ID is 1399811149 (the timestamp at which Solana launched). You will see this in every code example below.

Fetching New Pump.fun Token Launches

The filterTokens query lets you search and filter tokens across any supported launchpad. To get the most recently launched Pump.fun tokens, filter by launchpad name and sort by creation time:

const { filterTokens } = await sdk.query(gql`
 query {
   filterTokens(
     filters: {
       network: [1399811149]
       launchpadName: ["Pump.fun"]
     }
     rankings: { attribute: createdAt, direction: DESC }
     limit: 10
   ) {
     results {
       token {
         address
         name
         symbol
         networkId
         info { imageThumbUrl }
       }
       priceUSD
       liquidity
       marketCap
       volume24
       launchpad {
         name
         graduationPercent
         migrated
         migratedAt
         migratedPoolAddress
       }
       createdAt
     }
   }
 }
`);

This returns the 10 most recently created Pump.fun tokens with their current price, liquidity, market cap, 24-hour volume, and graduation status.

Filtering by Graduation Status

You can narrow your results based on where tokens are in their lifecycle:

  • Active bonding curve tokens only (not yet graduated): add launchpadMigrated: false to the filters
  • Graduated tokens only (already on Raydium): add launchpadMigrated: true
  • By graduation progress: use launchpadGraduationPercent to filter for tokens approaching graduation, for example, tokens above 80% that are close to migrating

This is where things get interesting for bot builders. Tokens near graduation often see increased trading activity as traders anticipate the liquidity migration to Raydium. Being able to programmatically scan for tokens at 85%+ graduation gives you an edge.

Getting Real-Time Prices and Trading Data

Once you have a token address, you can get its current price and recent trading activity.

Current price

const { getTokenPrices } = await sdk.query(gql`
 query {
   getTokenPrices(inputs: [{
     address: "PUMP_TOKEN_ADDRESS"
     networkId: 1399811149
   }]) {
     priceUsd
     address
   }
 }
`);

You can pass up to 25 token addresses in a single request, useful for monitoring a portfolio of Pump.fun tokens without burning through your rate limit.

Recent trades

To see individual buy and sell transactions for a specific token:

const { getTokenEvents } = await sdk.query(gql`
 query {
   getTokenEvents(
     address: "PUMP_TOKEN_ADDRESS"
     networkId: 1399811149
     limit: 20
   ) {
     items {
       eventDisplayType
       maker
       timestamp
       data {
         ... on SwapEventData {
           priceUsd
           priceUsdTotal
           amountNonLiquidityToken
         }
       }
     }
   }
 }
`);

Each event includes the trade direction (buy or sell), the maker's wallet address, the execution price, and the total USD value. This is the data you need to build a transaction feed, detect whale buys, or track smart money wallets on Pump.fun tokens.

Real-Time Streaming with WebSocketsexecution price

For trading bots and token scanners, polling REST endpoints is too slow. By the time you poll, process, and act, the opportunity may be gone. You need data pushed to you the instant it happens.

The Codex API supports WebSocket subscriptions for streaming Pump.fun data in real time. The onLaunchpadTokenEventBatch subscription pushes every new token launch and trading event as it occurs on-chain:

sdk.subscribe(gql`
 subscription {
   onLaunchpadTokenEventBatch(
     input: {
       protocol: Pump
       networkId: 1399811149
     }
   ) {
     eventType
     token {
       address
       name
       symbol
       networkId
     }
     data {
       priceUsd
       volumeUsd
       liquidityUsd
     }
   }
 }
`);

Understanding event types

There are two event types you should know about:

  • Deployed — The token has been detected on-chain immediately. This gives you the fastest possible notification but may lack metadata like images or social links. Latency: minimal.
  • Created — The token has been fully indexed with all metadata. Latency: 3-4 seconds after on-chain deployment.

If speed is everything, subscribe to Deployed events for the earliest possible signal and then enrich with metadata later. If you need complete token information before acting, use Created events.

For the fastest setup, subscribe to both and handle them accordingly, Deployed triggers your initial alert, Created fills in the details.

You can also use the onPriceUpdated subscription to track the price of a specific token in real time, which is useful once you have identified a token worth watching.

Building a Simple New Token Scanner

Here is a complete, working script that watches for new Pump.fun token launches and logs the key data. This is roughly 30 lines of code and gives you a functional scanner you can run from your terminal:

import { Codex } from "@codex-data/sdk";
import { gql } from "graphql-tag";

const sdk = new Codex(process.env.CODEX_API_KEY!);

console.log("Watching for new Pump.fun tokens...\n");

sdk.subscribe(
 gql`
   subscription {
     onLaunchpadTokenEventBatch(
       input: { protocol: Pump, networkId: 1399811149 }
     ) {
       eventType
       token { address name symbol }
       data { priceUsd volumeUsd liquidityUsd }
     }
   }
 `,
 {
   next: (event) => {
     const batch = event.data?.onLaunchpadTokenEventBatch;
     if (!batch) return;

     for (const item of Array.isArray(batch) ? batch : [batch]) {
       if (item.eventType === "Created") {
         console.log(`New token: ${item.token.name} (${item.token.symbol})`);
         console.log(`  Address: ${item.token.address}`);
         console.log(`  Price: $${item.data?.priceUsd || "N/A"}`);
         console.log(`  Liquidity: $${item.data?.liquidityUsd || "N/A"}\n`);
       }
     }
   },
 }
);

Run this and you will see new Pump.fun tokens appear in your terminal within seconds of launching on-chain.

What to build next

This scanner is a starting point. From here you could:

  • Add filters: skip tokens below a minimum liquidity threshold or without an image
  • Send alerts to Telegram or Discord: pipe the output to a bot that notifies your group chat
  • Feed into a trading bot: use the scanner as the discovery layer and add execution logic on top
  • Track graduation progress: monitor bonding curve percentage and alert when tokens approach graduation
  • Cross-reference holders: check if known smart money wallets are buying early

Alternatives to Codex for Pump.fun Data

Codex is not the only option. Here are the main alternatives and where they fit:

PumpPortal is a solid free option if you only need basic Pump.fun event streaming and nothing else. But the moment you need holder data, graduation tracking, multi-chain support, or enriched analytics, you need something more comprehensive.

Why Codex for Pump.fun Data?

A few things make Codex the right tool for this job:

  • Pump.fun does not have a public APIa. Codex indexes Pump.fun data directly from the Solana blockchain. You do not need to scrape anything or run your own indexer.
  • Sub-second data freshness. New tokens appear in your WebSocket subscription within moments of on-chain deployment. Building your own Solana indexer to achieve this level of speed would take months of engineering time.
  • More than just Pump.fun. Codex supports over 30 launchpads, including Pump.fun, Four.meme, LaunchLab, Meteora, Clanker, Virtuals, boop, and more, across 80+ blockchain networks. If you build your scanner on Codex, expanding to other launchpads and chains is a filter change, not a rewrite.
  • Enriched data out of the box. USD pricing, holder analytics, graduation tracking, and aggregated metrics are all available through the same API. You do not need to stitch together multiple data sources.
  • Free tier to get started. 10,000 requests per month is enough to build and validate your scanner or bot before committing to a paid plan. Sign up here.

For more details on working with Solana data via API, see our Solana API guide.

FAQ

Does Pump.fun have a public API?

No. Pump.fun does not offer a public data API. To get Pump.fun token data programmatically, you need to either run your own Solana indexer or use a third-party API like Codex that indexes Pump.fun data directly from the blockchain.

How do I track new Pump.fun token launches in real time?

Use a WebSocket subscription to stream new token events as they happen. The Codex API offers the onLaunchpadTokenEventBatch subscription, which pushes new Pump.fun token launches with sub-second latency. You can filter by event type: use Deployed for the fastest possible notification or Created for fully enriched token data.

What data is available for Pump.fun tokens via API?

Through the Codex API, you can access: real-time USD pricing, trading activity (buys, sells, volume), holder data, token metadata (name, symbol, image), liquidity and market cap, bonding curve progress (graduation percentage), and migration status (whether the token has graduated to Raydium along with the Raydium pool address).

How do I detect when a Pump.fun token graduates to Raydium?

Use the filterTokens query with launchpadMigrated: true to find graduated tokens. You can also monitor the graduationPercent field to track how close active tokens are to graduating. Once a token migrates, the migratedPoolAddress field gives you the Raydium pool address.

Is the Codex API free for Pump.fun data?

Codex offers a free tier with 10,000 requests per month, enough to build and test a Pump.fun scanner or bot. WebSocket subscriptions require a Growth plan. Paid plans start at $350 per million requests. See pricing details.

Start building with Codex. Sign up free and make your first API call in under 5 minutes.