Skip to main content

Pump.fun Historical Data API

Pump fun historical data on Bitquery comes in three layers. The right one depends on how far back you need to go and whether you need single trades or totals.

Most requests are for a Pump.fun token trade history or a Pump.fun price history. Both come from the Trading API for the last 30 days. Totals further back come from the archive, and older single trades come as files.

You needUseHow far backExample
Single trades, candles, top traders, first buyersTrading API: Trading.Trades, Trading.Tokens, Trading.PairsLast 30 daysLatest trades
Totals: OHLCV, volume, all-time high, PnLSolana(dataset: archive) or combined, DEXTradeByTokens, aggregates onlyFrom 1 June 2024Daily OHLCV
Single trades older than 30 daysBitquery Data Store exportFull historySolana exports

Every query on this page runs as written in the Bitquery IDE.

How to get it​

Pick the layer by age and by shape. Ask two questions: is the period inside the last 30 days, and do you need each trade or a total?

  • Each trade, last 30 days: query Trading.Trades with Pair.Market.Network set to "Solana" and Pair.Token.Address set to the mint.
  • Candles, last 30 days: query Trading.Tokens for one token across all its pools, or Trading.Pairs for one pool. Always set Interval.Time.Duration.
  • Totals further back: query DEXTradeByTokens on Solana(dataset: archive). Use combined when the range has to reach the current block.
  • Each trade, older than 30 days: order an export from the Bitquery Data Store. File layouts are on the Solana exports page.

Narrow to the Pump.fun venue when you need to. A Pump.fun token trades on the bonding curve first and on PumpSwap after it graduates. Larger tokens also trade on other Solana DEXs.

VenuePair.Market.ProgramPair.Market.ProtocolPair.Market.ProtocolFamily
Pump.fun bonding curve6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6PpumpPumpfun
PumpSwappAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEApump_ammPumpswap

Filter on the mint alone to get the token on every venue. Add one of the Market filters above to keep a single venue.

Bound every query in time. Use a relative window such as since_relative: { days_ago: 30 }, order by a time column and set a limit.

The free trial and paid self-service plans cover real-time data and the Trading API window. The archive and combined queries need the Solana Historical OHLCV & Token Price Data add-on from the pricing page.

Fields​

Trading API (last 30 days)

FieldWhat it holds
Block.Time, Block.DateTime of the trade. Filter and order on these.
Pair.Token.AddressThe token mint.
Pair.QuoteTokenThe other side of the pair, usually SOL or WSOL.
Pair.Market.Program, Protocol, ProtocolFamilyThe venue. See the table above.
SideBuy or Sell, from the trader's point of view.
Price, PriceInUsdPrice in the quote token and in USD.
Amounts.Base, AmountsInUsd.BaseToken amount and its USD value.
Trader.AddressThe wallet that traded.
TransactionHeader.HashThe transaction signature.
Supply.MarketCapMarket cap at the time of the trade.
Price.Ohlc, Volume.Usd on Trading.TokensBuilt candle and its USD volume.
Interval.Time.Start, Duration on Trading.TokensCandle start and size in seconds.

Archive aggregates (from 1 June 2024)

FieldWhat it holds
Block.Time(interval: ...)The time bucket: minutes, hours, days or months.
Trade.Currency.MintAddressThe token mint.
Trade.Side.Currency.MintAddressThe quote token mint.
Trade.Dex.ProtocolName, Trade.Dex.ProgramAddressThe venue: pump or pump_amm.
Trade.PriceInUSD(maximum: Trade_PriceInUSD)Highest USD price in the bucket.
Trade.PriceInUSD(minimum: Block_Slot)Open price of the bucket.
sum(of: Trade_Amount), sum(of: Trade_Side_AmountInUSD)Volume in tokens and in USD.
quantile(of: Trade_PriceInUSD, level: 0.99)A high price that ignores outlier prints.
Trade.Account.OwnerThe trading wallet, for grouped totals such as PnL.
countNumber of trades in the bucket.

Last 30 days: Trading API​

These examples read single trades and built candles. The older token is Fartcoin (9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump), a Pump.fun token launched in October 2024 that still trades every minute.

The launch examples use OpenIndex (FuKY3dk7QmpbDdQRjzbjB3G6PiCuqKNvN4dAWDpwpump), launched on Pump.fun on 21 November 2026. For your own token, swap in a mint launched within the last 30 days.

Latest trades of a Pump.fun token​

This query returns the newest trades of one token with the trader, the transaction signature, the venue and the USD price. Run in the IDE.

  • Pair.Token.Address is the mint.
  • since_relative: { days_ago: 30 } covers the whole Trading API window.
  • Pair.Market in the result shows which venue each trade happened on.
{
Trading {
Trades(
where: {
Pair: {
Market: { Network: { is: "Solana" } }
Token: { Address: { is: "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump" } }
}
Block: { Date: { since_relative: { days_ago: 30 } } }
}
orderBy: { descending: Block_Time }
limit: { count: 50 }
) {
Block {
Time
}
Side
Price
PriceInUsd
Amounts {
Base
Quote
}
AmountsInUsd {
Base
}
Trader {
Address
}
TransactionHeader {
Hash
}
Pair {
Market {
Protocol
ProtocolFamily
Program
}
QuoteToken {
Symbol
Address
}
}
}
}
}

First trades of a token after launch​

This query returns the first 50 trades of a recently launched token on the bonding curve, oldest first. Run in the IDE.

  • Pair.Market.Program keeps only bonding curve trades. Remove it to include PumpSwap trades after graduation.
  • ascending: Block_Time puts the launch trade first.
  • Supply.MarketCap shows the market cap as the curve fills.
{
Trading {
Trades(
where: {
Pair: {
Market: {
Network: { is: "Solana" }
Program: { is: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P" }
}
Token: { Address: { is: "FuKY3dk7QmpbDdQRjzbjB3G6PiCuqKNvN4dAWDpwpump" } }
}
Block: { Date: { since_relative: { days_ago: 30 } } }
}
orderBy: { ascending: Block_Time }
limit: { count: 50 }
) {
Block {
Time
}
Side
PriceInUsd
Amounts {
Base
Quote
}
AmountsInUsd {
Base
}
Trader {
Address
}
TransactionHeader {
Hash
}
Supply {
MarketCap
}
Pair {
Market {
Protocol
}
}
}
}
}

Hourly candles for 30 days​

This query returns built hourly candles in USD for one token across all its pools, newest first. This is the Pump.fun price history most charts need. Run in the IDE.

  • Duration: { eq: 3600 } is the candle size in seconds and must be set.
  • limit: { count: 720 } is 30 days of hours.
{
Trading {
Tokens(
where: {
Token: {
Network: { is: "Solana" }
Address: { is: "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump" }
}
Interval: { Time: { Duration: { eq: 3600 } } }
Block: { Date: { since_relative: { days_ago: 30 } } }
}
orderBy: { descending: Interval_Time_Start }
limit: { count: 720 }
) {
Interval {
Time {
Start
}
}
Price {
Ohlc {
Open
High
Low
Close
}
}
Volume {
Usd
}
}
}
}

One-minute candles for the last day​

This query returns one-minute candles in USD for the last 24 hours, newest first. Run in the IDE.

  • Duration: { eq: 60 } selects one-minute candles.
  • hours_ago: 24 bounds the window, and limit: { count: 1440 } is one day of minutes.
  • A minute with no trades has no candle.
{
Trading {
Tokens(
where: {
Token: {
Network: { is: "Solana" }
Address: { is: "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump" }
}
Interval: { Time: { Duration: { eq: 60 } } }
Block: { Time: { since_relative: { hours_ago: 24 } } }
}
orderBy: { descending: Interval_Time_Start }
limit: { count: 1440 }
) {
Interval {
Time {
Start
}
}
Price {
Ohlc {
Open
High
Low
Close
}
}
Volume {
Base
Usd
}
}
}
}

Top traders of a token over 7 days​

This query ranks the wallets that traded a token over the last 7 days by USD volume, with bought and sold amounts split out. Run in the IDE.

  • The query groups every trade of the token in the window by Trader.Address.
  • Start with 7 days. Widen the window only for tokens with light trading.
{
Trading {
Trades(
where: {
Pair: {
Market: { Network: { is: "Solana" } }
Token: { Address: { is: "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump" } }
}
Block: { Date: { since_relative: { days_ago: 7 } } }
}
orderBy: { descendingByField: "volume_usd" }
limit: { count: 100 }
) {
Trader {
Address
}
volume_usd: sum(of: AmountsInUsd_Base)
bought_usd: sum(of: AmountsInUsd_Base, if: { Side: { is: "Buy" } })
sold_usd: sum(of: AmountsInUsd_Base, if: { Side: { is: "Sell" } })
trades: count
}
}
}

First buyers of a token​

This query returns the first 100 distinct wallets that bought a recently launched token, with the time, price and size of each wallet's first buy. Run in the IDE.

  • Side: { is: "Buy" } keeps buys only.
  • limitBy: { by: Trader_Address, count: 1 } keeps one row per wallet.
  • ascending: Block_Time puts the earliest buyers first.
{
Trading {
Trades(
where: {
Pair: {
Market: { Network: { is: "Solana" } }
Token: { Address: { is: "FuKY3dk7QmpbDdQRjzbjB3G6PiCuqKNvN4dAWDpwpump" } }
}
Side: { is: "Buy" }
Block: { Date: { since_relative: { days_ago: 30 } } }
}
orderBy: { ascending: Block_Time }
limitBy: { by: Trader_Address, count: 1 }
limit: { count: 100 }
) {
Block {
Time
}
Trader {
Address
}
PriceInUsd
AmountsInUsd {
Base
}
TransactionHeader {
Hash
}
}
}
}

Daily volume for 30 days​

This query returns the USD and token volume of one token per day for the last 30 days, newest first. Run in the IDE.

  • It rolls the hourly candles up into days with Time(interval: { in: days, count: 1 }).
  • Duration: { eq: 3600 } must stay, so each hour is counted once.
{
Trading {
Tokens(
where: {
Token: {
Network: { is: "Solana" }
Address: { is: "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump" }
}
Interval: { Time: { Duration: { eq: 3600 } } }
Block: { Date: { since_relative: { days_ago: 30 } } }
}
orderBy: { descendingByField: "Block_Day" }
limit: { count: 31 }
) {
Block {
Day: Time(interval: { in: days, count: 1 })
}
volume_usd: sum(of: Volume_Usd)
volume_tokens: sum(of: Volume_Base)
}
}
}

Further back: aggregates on the archive​

These examples read totals from DEXTradeByTokens on Solana(dataset: archive). The archive answers grouped questions: a price per day, a volume per month, a high over a period.

Keep a Block.Date bound on every archive query. A narrower range returns faster.

Highest price of a token, up to its all-time high​

This query returns the highest USD price of a token against WSOL over the last 90 days. Run in the IDE.

  • days_ago: 90 keeps the query fast on a heavily traded token. Raise it step by step to reach further back, up to the start of the archive on 1 June 2024.
  • quantile(... level: 0.99) is a high that ignores outlier prints. max_price_usd is the raw maximum.
  • The Side.Currency filter keeps the WSOL pair, which holds most of the trading.
{
Solana(dataset: archive) {
DEXTradeByTokens(
where: {
Block: { Date: { since_relative: { days_ago: 90 } } }
Trade: {
Currency: { MintAddress: { is: "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump" } }
Side: { Currency: { MintAddress: { is: "So11111111111111111111111111111111111111112" } } }
}
}
limit: { count: 1 }
) {
ath_usd: quantile(of: Trade_PriceInUSD, level: 0.99)
Trade {
max_price_usd: PriceInUSD(maximum: Trade_PriceInUSD)
}
trades: count
}
}
}

Pump.fun tokens have a supply of 1 billion, so the all-time high market cap is the price multiplied by 1,000,000,000.

Daily OHLCV older than 30 days​

This query returns daily open, high, low and close in USD, with volume and trade count, for the 90 days before the Trading API window. Run in the IDE.

  • since_relative: { days_ago: 120 } and till_relative: { days_ago: 30 } set the range. Move both to go further back.
  • Time(interval: { in: days, count: 1 }) sets the candle size. Use hours or minutes for smaller candles.
  • open and close are the prices at the lowest and highest slot of each day.
{
Solana(dataset: archive) {
DEXTradeByTokens(
where: {
Block: { Date: { since_relative: { days_ago: 120 }, till_relative: { days_ago: 30 } } }
Trade: {
Currency: { MintAddress: { is: "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump" } }
Side: { Currency: { MintAddress: { is: "So11111111111111111111111111111111111111112" } } }
}
}
orderBy: { descendingByField: "Block_Timefield" }
limit: { count: 90 }
) {
Block {
Timefield: Time(interval: { in: days, count: 1 })
}
volume: sum(of: Trade_Amount)
volume_usd: sum(of: Trade_Side_AmountInUSD)
Trade {
high: PriceInUSD(maximum: Trade_PriceInUSD)
low: PriceInUSD(minimum: Trade_PriceInUSD)
open: PriceInUSD(minimum: Block_Slot)
close: PriceInUSD(maximum: Block_Slot)
}
trades: count
}
}
}

Errors and the fix​

These messages come back when a query asks the archive for single trades. The archive holds totals, so each one has a working query on this page.

Error message containsWhat the query asked forUse instead
no table can query DEXTradeByToken with field Block.Slot or Transaction.SignerSingle trades from DEXTradeByTokens on archive or combinedLatest trades of a Pump.fun token
metric 'minimum' has no columns on this table for Trade.PriceInUSDA first or last price picked by Block_TimeDaily OHLCV, which picks by Block_Slot, or first trades after launch
no API tables for cube DEXTradeByTokenaggregates: no on archiveLatest trades of a Pump.fun token

For single trades older than 30 days, order a Bitquery Data Store export.

Things to know​

  • Trading API window: it holds about the last 30 days. Anchor queries with relative windows so they keep working as time moves.
  • Archive start: aggregate history on DEXTradeByTokens starts on 1 June 2024.
  • Archive shape: the archive returns grouped totals. Select aggregates such as sum, count, quantile, maximum and minimum, grouped by a time bucket, a token or a wallet.
  • Two venues: a token's curve trades carry Protocol pump and its PumpSwap trades carry pump_amm. Filter on the mint alone to follow a token through graduation.
  • Candle sizes: Trading.Tokens has ten fixed durations from 1 second to 1 hour. Roll hourly candles up for daily or weekly bars, as in the daily volume example.
  • Candles follow trades: a period with no trades has no candle.
  • Grouped queries: top traders and similar rankings read every trade in the window. Start with 7 days.
  • Realtime: for live trades, new launches and bonding curve progress, use the Pump.fun API page.

FAQ​

Frequently Asked Questions

How do I get pump fun historical data from an API?

Use the Bitquery Trading API for the last 30 days: Trading.Trades for single trades and Trading.Tokens for candles, filtered by the token mint. For totals further back, to 1 June 2024, query DEXTradeByTokens on the Solana archive dataset. For single trades older than 30 days, order a Bitquery Data Store export.

How do I get the price history of a Pump.fun token?

Query Trading.Tokens with the mint, Network Solana and an Interval.Time.Duration such as 60 or 3600. It returns built USD candles for the last 30 days. For daily price history before that, use the daily OHLCV example on the archive dataset.

How far back does Pump.fun trade history go?

Single trades with trader, signature and USD price are in the Trading API for about the last 30 days. Aggregates such as OHLCV, volume and all-time high go back to 1 June 2024 on the archive dataset. Full trade-by-trade history ships as Parquet exports from the Bitquery Data Store.

Why does my archive query fail with 'no table can query DEXTradeByToken'?

The archive holds totals. A query that selects a slot, a signer or a signature from DEXTradeByTokens on archive or combined gets this error. Use Trading.Trades for single trades in the last 30 days, or a Data Store export for older ones.

How do I get the all-time high price of a Pump.fun token?

Query DEXTradeByTokens on the archive dataset with the mint, a Block.Date bound and PriceInUSD(maximum: Trade_PriceInUSD), or a 0.99 quantile to ignore outlier prints. Multiply by 1 billion for the all-time high market cap.

How do I find the first buyers of a Pump.fun token?

For a token launched in the last 30 days, query Trading.Trades with Side Buy, order by Block_Time ascending and add limitBy on Trader_Address with count 1. Each row is one wallet's first buy.

Does the history include trades after a token graduates to PumpSwap?

Yes. Filter by the mint alone and the result covers the bonding curve, PumpSwap and any other DEX the token trades on. Add Pair.Market.Program or Pair.Market.Protocol to keep one venue.

Is Pump.fun historical data in the free trial?

The trial covers real-time data and the Trading API window. Queries on the archive and combined datasets need the Solana Historical OHLCV and Token Price Data add-on listed on the pricing page.

Build with Bitquery

Ready to run this in production?

Get an API key and run these queries in minutes, or talk to us about plans and enterprise delivery.