in-solana by Supanode

Pump.fun Historical and Trade Data

TL;DR

  • - Pump.fun trade data is on-chain — extract it from transaction history
  • - Use Geyser gRPC for real-time capture, archive RPC or indexers for historical backfill
  • - Each trade instruction contains the token mint, SOL amount, and token amount

Pump.fun trade data lives entirely on-chain as transactions to the Pump.fun program. Accessing historical data requires either capturing trades in real-time via streaming or backfilling from historical transactions.

Data available

From each Pump.fun transaction, you can extract:

FieldSource
Token mintInstruction accounts
Trade type (buy/sell)Instruction discriminator
SOL amountInstruction data or transfer inner instruction
Token amountToken transfer inner instruction
Trader walletTransaction signer
TimestampBlock time
Bonding curve stateAccount data (reserves, complete flag)
Token creation metadataCreate instruction data (name, symbol, URI)

Real-time capture

Geyser gRPC stream

Set up a continuous stream of all Pump.fun transactions:

const stream = client.subscribe({
  transactions: {
    pumpfun: {
      accountInclude: [PUMPFUN_PROGRAM_ID],
      failed: false, // Only successful transactions
    },
  },
});

for await (const tx of stream) {
  const parsed = parsePumpfunTransaction(tx);
  if (parsed.type === "create") {
    await db.insertToken(parsed);
  } else if (parsed.type === "buy" || parsed.type === "sell") {
    await db.insertTrade(parsed);
  } else if (parsed.type === "migrate") {
    await db.markMigrated(parsed.mint);
  }
}

Storage schema

CREATE TABLE pumpfun_tokens (
  mint TEXT PRIMARY KEY,
  name TEXT,
  symbol TEXT,
  uri TEXT,
  creator TEXT NOT NULL,
  created_at TIMESTAMP NOT NULL,
  migrated BOOLEAN DEFAULT FALSE,
  migrated_at TIMESTAMP
);

CREATE TABLE pumpfun_trades (
  signature TEXT PRIMARY KEY,
  mint TEXT NOT NULL REFERENCES pumpfun_tokens(mint),
  trader TEXT NOT NULL,
  trade_type TEXT NOT NULL, -- 'buy' or 'sell'
  sol_amount BIGINT NOT NULL,
  token_amount BIGINT NOT NULL,
  slot BIGINT NOT NULL,
  block_time TIMESTAMP NOT NULL
);

Historical backfill

From archive RPC

Iterate through historical signatures for the Pump.fun program:

let before: string | undefined;
while (true) {
  const sigs = await connection.getSignaturesForAddress(
    new PublicKey(PUMPFUN_PROGRAM_ID),
    { before, limit: 1000 },
    "confirmed",
  );

  if (sigs.length === 0) break;
  before = sigs[sigs.length - 1].signature;

  for (const sig of sigs) {
    const tx = await connection.getTransaction(sig.signature, {
      maxSupportedTransactionVersion: 0,
    });
    if (tx) {
      const parsed = parsePumpfunTransaction(tx);
      await db.insert(parsed);
    }
  }
}

This is slow (rate-limited by RPC) but covers the full history. Use an archive RPC node for access to older data.

From data services

Some blockchain data services index Pump.fun transactions. Check:

  • Flipside Crypto (SQL access).
  • Custom Pump.fun analytics providers.
  • Community-built indexers.

Analytics queries

Token launch volume by day

SELECT
  DATE(created_at) as day,
  COUNT(*) as tokens_created
FROM pumpfun_tokens
GROUP BY day
ORDER BY day DESC;

Top traded tokens

SELECT
  t.mint,
  tk.name,
  tk.symbol,
  COUNT(*) as trade_count,
  SUM(t.sol_amount) as total_sol_volume
FROM pumpfun_trades t
JOIN pumpfun_tokens tk ON t.mint = tk.mint
WHERE t.block_time > NOW() - INTERVAL '24 hours'
GROUP BY t.mint, tk.name, tk.symbol
ORDER BY total_sol_volume DESC
LIMIT 20;

Trader profitability

SELECT
  trader,
  SUM(CASE WHEN trade_type = 'buy' THEN -sol_amount ELSE sol_amount END) as net_sol
FROM pumpfun_trades
WHERE mint = '<TOKEN_MINT>'
GROUP BY trader
ORDER BY net_sol DESC;

Infrastructure sizing

ScopeStorage estimateCompute
Real-time only (no history)1–5 GB/monthLight
Last 30 days30–100 GBMedium
Full history500 GB–2 TBHeavy

Pump.fun generates thousands of transactions per hour during active periods. Plan storage accordingly.

FAQ

Is there an official Pump.fun API for historical data? Pump.fun provides some API endpoints. Check their documentation for current availability. For comprehensive historical data, on-chain indexing is the most reliable approach.

How many transactions does Pump.fun process per day? Volume varies significantly. During peak activity (viral token launches), Pump.fun can process tens of thousands of transactions per hour.

Can I track a specific token’s price history? Yes. From the trade data, calculate the price at each trade: sol_amount / token_amount. Plot this over time for a price chart.

How do I detect rug pulls? Monitor for patterns: creator sells a large percentage of supply shortly after launch, bonding curve drains to migration threshold quickly via coordinated buys. These patterns are detectable from trade data analysis.

Updated: