Skip to main content

Pump Fun Marketcap & Bonding Curve API

In this document, we will explore examples to get marketcap, bonding curve progress and whether the token migrated to PumpSwap or not yet. We have the fully exhaustive Pump Fun API documentation here. Additionally, we have the Moonshot API available, and you can access its documentation here.

These APIs can be provided through different streams including Kafka for zero latency requirements. Please contact us on telegram.

note

Trade Side Account field will not be available for aggregate queries in Archive and Combined Datasets

Get Latest Marketcap of a PumpFun Token

Use Trading API Pairs: latest row per token with limit: { count: 1 }, orderBy: { descending: Block_Time }, Token.Id matching your mint (solana:<mint>), Market.ProtocolFamily Pumpfun, and interval duration > 1 second. The response includes Supply.MarketCap, FDV, OHLC, volume, and token metadata.

Test the query here.

Click to expand GraphQL query
{
Trading {
Pairs(
limit: { count: 1 }
orderBy: { descending: Block_Time }
where: {
Token: {
Id: {
includesCaseInsensitive: "solana:7GMB7XbtTdvnHkPjH6yEwTUB3HYf5dqC3FKyr2sueMEh"
}
}
Interval: { Time: { Duration: { gt: 1 } } }
Market: { ProtocolFamily: { is: "Pumpfun" } }
}
) {
Token {
Name
Id
Address
Symbol
}
Block {
Time
}
Market {
Program
Protocol
ProtocolFamily
}
Supply {
TotalSupply
FullyDilutedValuationUsd
MarketCap
}
Price {
Average {
Mean
}
Ohlc {
Open
Low
High
Close
}
}
Volume {
Base
BaseAttributedToUsd
Quote
Usd
}
}
}
}

Get Tokens with a specific MarketCap

Stream Trading Pairs in real time for Solana tokens on Pumpfun when Supply.MarketCap is above a threshold (example below: > $10,000 USD). Change Supply.MarketCap.gt to tune the floor. Interval duration must be > 1 second.

Try it with this stream link.

Click to expand GraphQL subscription
subscription {
Trading {
Pairs(
where: {
Token: { Id: { includesCaseInsensitive: "solana" } }
Interval: { Time: { Duration: { gt: 1 } } }
Supply: { MarketCap: { gt: 10000 } }
Market: { ProtocolFamily: { is: "Pumpfun" } }
}
) {
Currency {
Name
Id
Symbol
}
Token {
Name
Symbol
Id
Address
Network
}
Market {
Protocol
ProtocolFamily
}
Supply {
TotalSupply
FullyDilutedValuationUsd
MarketCap
}
}
}
}

You can also use TokenSupplyUpdates for supply-driven views; see the token supply cube.

Top Pump.fun tokens by market cap change in the last 1 hour

Trading Pairs with 1-hour OHLC (Duration: { eq: 3600 }), Market.ProtocolFamily Pumpfun, Token.Network Solana, ordered by change_mcap: (close − open) × total supply. Up to 50 rows; adjust limit as needed.

Test the query here.

Click to expand GraphQL query
{
Trading {
Pairs(
limit: { count: 50 }
orderBy: { descendingByField: "change_mcap" }
where: {
Market: { ProtocolFamily: { is: "Pumpfun" } }
Interval: { Time: { Duration: { eq: 3600 } } }
Token: { Network: { is: "Solana" } }
}
) {
Currency {
Id
Name
Symbol
}
Token {
Network
Symbol
Address
}
Supply {
MarketCap
FullyDilutedValuationUsd
CirculatingSupply
TotalSupply
MaxSupply
}
change_mcap: calculate(
expression: "($Price_Ohlc_Close-$Price_Ohlc_Open) * Supply_TotalSupply"
)
Price {
Ohlc {
Open
Close
}
}
}
}
}

Track Pump Fun Token Migrations to PumpSwap in Realtime - Subscription

Stream successful PumpSwap create_pool instructions (pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA) at depth 1, excluding placeholder mint 11111111111111111111111111111111 in instruction arguments. Migrated pair details appear under Instruction.Accounts.

Run the subscription in the Bitquery IDE.

Click to expand GraphQL subscription
subscription {
Solana {
Instructions(
where: {
Transaction: { Result: { Success: true } }
Instruction: {
Depth: { eq: 1 }
Program: {
Method: { is: "create_pool" }
Address: { is: "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA" }
Arguments: {
includes: [{ Value: { Address: { notIn: ["11111111111111111111111111111111"] } } }]
}
}
}
}
) {
Migrate_Time: Block {
Time
}
Instruction {
Program {
Name
Method
AccountNames
Arguments {
Name
Value {
... on Solana_ABI_BigInt_Value_Arg {
bigInteger
}
... on Solana_ABI_Address_Value_Arg {
address
}
... on Solana_ABI_Boolean_Value_Arg {
bool
}
... on Solana_ABI_Integer_Value_Arg {
integer
}
}
}
}
Accounts {
Address
IsWritable
Token {
Mint
Owner
ProgramId
}
}
CallerIndex
Depth
CallPath
}
Transaction {
Signature
Signer
Fee
}
}
}
}

Latest Pump Fun Token Migrations to PumpSwap - Query

Same filters as the subscription, with limit: { count: 20 } and orderBy: { descending: Block_Slot } for recent migrations.

Run the query in the Bitquery IDE.

Click to expand GraphQL query
query {
Solana {
Instructions(
limit: { count: 20 }
orderBy: { descending: Block_Slot }
where: {
Transaction: { Result: { Success: true } }
Instruction: {
Depth: { eq: 1 }
Program: {
Method: { is: "create_pool" }
Address: { is: "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA" }
Arguments: {
includes: [{ Value: { Address: { notIn: ["11111111111111111111111111111111"] } } }]
}
}
}
}
) {
Migrate_Time: Block {
Time
}
Instruction {
Program {
Name
Method
AccountNames
Arguments {
Name
Value {
... on Solana_ABI_BigInt_Value_Arg {
bigInteger
}
... on Solana_ABI_Address_Value_Arg {
address
}
... on Solana_ABI_Boolean_Value_Arg {
bool
}
... on Solana_ABI_Integer_Value_Arg {
integer
}
}
}
}
Accounts {
Address
IsWritable
Token {
Mint
Owner
ProgramId
}
}
CallerIndex
Depth
CallPath
}
Transaction {
Signature
Signer
Fee
}
}
}
}

Pumpfun Token Migrations on a specific date - Historical

Retrieve Pump.fun token migrations on a specific date. The API returns transfers to the PumpSwap migration receiver address for the given date.

Try the query

Click to expand GraphQL query
{
solana {
transfers(
options: { limit: 500 }
date: { is: "2024-10-18" }
currency: { not: "SOL" }
externalProgramId: { is: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P" }
transferType: { in: transfer }
receiverAddress: { is: "39azUYFWPz3VHgKCf3VChUwbpURdCHRxjWVowf5jUJjg" }
) {
block {
height
timestamp {
iso8601
}
}
instruction {
action {
name
}
callPath
external
externalAction {
name
type
}
program {
name
id
}
externalProgram {
id
name
}
}
currency {
name
symbol
address
}
date {
date
}
amount
sender {
address
mintAccount
type
}
receiver {
address
mintAccount
type
}
transaction {
signature
signer
}
transferType
}
}
}

Check if the Pump Fun Token has migrated to PumpSwap - API

To check if a Pump Fun Token has migrated to PumpSwap, we can use the below query. In this query we are checking if this token 6SmgaPU4LMd8eWhamtpTtArr7JYPKZSF8AKK2Uy5pump has migrated to PumpSwap. You can run the query here.

Click to expand GraphQL query
query ($token: String) {
Solana {
Instructions(
where: {
Instruction: {
Accounts: { includes: { Address: { is: $token } } }
Program: {
Address: { is: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P" }
}
Logs: { includes: { includes: "Migrate" } }
}
Transaction: { Result: { Success: true } }
}
) {
Migrate_Time: Block {
Time
}
Instruction {
Program {
Name
Method
Arguments {
Name
Value {
... on Solana_ABI_Json_Value_Arg {
json
}
... on Solana_ABI_Float_Value_Arg {
float
}
... on Solana_ABI_Boolean_Value_Arg {
bool
}
... on Solana_ABI_Bytes_Value_Arg {
hex
}
... on Solana_ABI_BigInt_Value_Arg {
bigInteger
}
... on Solana_ABI_Address_Value_Arg {
address
}
... on Solana_ABI_String_Value_Arg {
string
}
... on Solana_ABI_Integer_Value_Arg {
integer
}
}
}
Address
AccountNames
}
Accounts {
Token {
ProgramId
Owner
Mint
}
IsWritable
Address
}
}
Transaction {
Signature
}
joinInstructions(
join: any_inner
Transaction_Index: Transaction_Index
Transaction_Signature: Transaction_Signature
where: {
Instruction: {
Program: {
Address: { is: "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA" }
Method: { is: "create_pool" }
}
}
}
) {
Instruction {
Program {
Name
Method
Arguments {
Value {
... on Solana_ABI_Address_Value_Arg {
address
}
... on Solana_ABI_String_Value_Arg {
string
}
}
Type
Name
}
AccountNames
}
Accounts {
Address
Token {
Owner
Mint
}
}
}
}
}
}
}
{
"token":"6SmgaPU4LMd8eWhamtpTtArr7JYPKZSF8AKK2Uy5pump"
}

Bonding Curve Progress API

Below query will give you the Bonding curve progress percentage of a specific Pump Fun Token.

Bonding Curve Progress Formula

  • Formula: BondingCurveProgress = 100 - ((leftTokens * 100) / initialRealTokenReserves)

Where:

  • leftTokens = realTokenReserves - reservedTokens

  • initialRealTokenReserves = totalSupply - reservedTokens

  • Definitions:

    • initialRealTokenReserves = totalSupply - reservedTokens
      • totalSupply: 1,000,000,000 (Pump Fun Token)
      • reservedTokens: 206,900,000
      • Therefore, initialRealTokenReserves: 793,100,000
    • leftTokens = realTokenReserves - reservedTokens
      • realTokenReserves: Token balance at the market address.
note

Simplified Formula: BondingCurveProgress = 100 - (((balance - 206900000) * 100) / 793100000)

Additional Notes

  • Balance Retrieval:
    • The balance is the token balance at the market address.
    • Use this query to fetch the balance and then we use espressions to calculate the bonding curve progress percentage in the query itself: Query Link.
Click to expand GraphQL query
query GetBondingCurveProgressPercentage {
Solana {
DEXPools(
limit: { count: 1 }
orderBy: { descending: Block_Slot }
where: {
Pool: {
Market: {
BaseCurrency: {
MintAddress: {
is: "3j3fKH9Nw9cPZsZSPvE5qNgLWnxGk6tBHM9kX3qopump"
}
}
}
Dex: {
ProgramAddress: {
is: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
}
}
}
}
) {
Bonding_Curve_Progress_percentage: calculate(
expression: "100 - ((($Pool_Base_Balance - 206900000) * 100) / 793100000)"
)
Pool {
Market {
MarketAddress
BaseCurrency {
MintAddress
Symbol
Name
}
QuoteCurrency {
MintAddress
Symbol
Name
}
}
Dex {
ProtocolFamily
ProtocolName
}
Quote {
PostAmount
PriceInUSD
PostAmountInUSD
}
Base {
Balance: PostAmount
}
}
}
}
}

Track Pump Fun Tokens above 95% Bonding Curve Progress in realtime

We can use above Bonding Curve formulae and get the Balance of the Pool needed to get to 95% and 100% Bonding Curve Progress range. And then track liquidity changes which result in Base{PostAmount} to fall in this range. You can run and test the saved query here.

Click to expand GraphQL query
subscription MyQuery {
Solana {
DEXPools(
where: {
Pool: {
Base: { PostAmount: { gt: "206900000", lt: "246555000" } }
Dex: {
ProgramAddress: {
is: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
}
}
Market: {
QuoteCurrency: {
MintAddress: {
in: [
"11111111111111111111111111111111"
"So11111111111111111111111111111111111111112"
]
}
}
}
}
Transaction: { Result: { Success: true } }
}
) {
Bonding_Curve_Progress_precentage: calculate(
expression: "100 - ((($Pool_Base_Balance - 206900000) * 100) / 793100000)"
)
Pool {
Market {
BaseCurrency {
MintAddress
Name
Symbol
}
MarketAddress
QuoteCurrency {
MintAddress
Name
Symbol
}
}
Dex {
ProtocolName
ProtocolFamily
}
Base {
Balance: PostAmount
}
Quote {
PostAmount
PriceInUSD
PostAmountInUSD
}
}
}
}
}

Top 100 About to Graduate Pump Fun Tokens

We can use below query to get top 100 About to Graduate Pump Fun Tokens. You can run and test the saved query here.

Click to expand GraphQL query
{
Solana {
DEXPools(
limitBy: { by: Pool_Market_BaseCurrency_MintAddress, count: 1 }
limit: { count: 100 }
orderBy: { ascending: Pool_Base_PostAmount }
where: {
Pool: {
Base: { PostAmount: { gt: "206900000" } }
Dex: {
ProgramAddress: {
is: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
}
}
Market: {
QuoteCurrency: {
MintAddress: {
in: [
"11111111111111111111111111111111"
"So11111111111111111111111111111111111111112"
]
}
}
}
}
Transaction: { Result: { Success: true } }
Block: { Time: { since_relative: { minutes_ago: 5 } } }
}
) {
Bonding_Curve_Progress_precentage: calculate(
expression: "100 - ((($Pool_Base_Balance - 206900000) * 100) / 793100000)"
)
Pool {
Market {
BaseCurrency {
MintAddress
Name
Symbol
}
MarketAddress
QuoteCurrency {
MintAddress
Name
Symbol
}
}
Dex {
ProtocolName
ProtocolFamily
}
Base {
Balance: PostAmount(maximum: Block_Time)
}
Quote {
PostAmount
PriceInUSD
PostAmountInUSD
}
}
}
}
}

Video Tutorials

Video Tutorial | How to get Bonding Curve Progress of any Pump Fun Token

Video Tutorial | How to track Pump Fun Token Migrations to PumpSwap in realtime

Video Tutorial | How to get Top Pump Fun Tokens by Marketcap Value

Video Tutorial | How to track the Pump Fun Tokens which are about to Graduate in Realtime