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 Raydium 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.

Get Latest Marketcap of a PumpFun Token​

You can get the marketcap of a pump fun token by this formulae marketcap = 1000000000 * Latest USD Price because all the pump fun tokens have 1 Billion supply.

You can get the latest USD price of the desired token (here I have used this token 9qzvgUMrrL5Xyadk2gyWxCWgTds8crkwGwgfjeN5JYLS) from the below query and multiply it with 1 Billion and you will get the latest marketcap of the specified token.

query MyQuery {
Solana {
DEXTradeByTokens(
limit: { count: 1 }
orderBy: { descending: Block_Time }
where: {
Trade: {
Currency: {
MintAddress: { is: "9qzvgUMrrL5Xyadk2gyWxCWgTds8crkwGwgfjeN5JYLS" }
}
Dex: {
ProgramAddress: {
is: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
}
}
}
Transaction: { Result: { Success: true } }
}
) {
Trade {
Currency {
Name
MintAddress
Symbol
}
Amount
AmountInUSD
Price
PriceInUSD
}
}
}
}

Check if the Pump Fun Token has migrated to Raydium​

You can be sure that a pump Fun Token has migrated to Raydium if it is being traded on Raydium DEX also. So this below query will check on which DEXes a particular token is getting traded. And if you only see PumpFun as the DEX Protocol Family that means it hasn't completed its bonding curve yet. You can find the saved query here.

query MyQuery {
Solana {
DEXTradeByTokens(
where: {
Transaction: { Result: { Success: true } }
Trade: {
Currency: {
MintAddress: { is: "74cWLXXDfQmwxBNPbgYu5mZ6javKDAdptgtYF5Rn41rY" }
}
}
}
) {
Trade {
Dex {
ProtocolName
ProtocolFamily
ProgramAddress
}
}
count
}
}
}

Bonding Curve Progress API​

You can get the Bonding Curve Progress by this formulae, BondingCurveProgress = 100 - ((leftTokens*100)/(initialRealTokenReserves)) where initialRealTokenReserves = totalSupply - reservedTokens, totalSupply is 1000000000 of a pump fun token and reservedTokens is 206900000. So initialRealTokenReserves is 793100000. We also need leftTokens to calculate bonding curve progress, it can be calculated like this leftTokens = realTokenReserves - reservedTokens. Here realTokenReserves is balance of the Token at the market address.

TLDR (or not able to understand) then just apply this formulae bondingCurveProgress= 100 - (((balance - 206900000)*100)/793100000). You can get the balance using this below query. You can run and test the saved query here.

query GetLatestLiquidityForPool {
Solana {
DexPools(
where: {
Pool: {
Market: {
BaseCurrency: {
MintAddress: {
is: "Eh81Ci2S8ty5M4z9Z3pqHmJmkorvf9XJiJLGksF6pump"
}
}
}
Dex: {
ProgramAddress: {
is: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
}
}
}
}
orderBy: { descending: Block_Slot }
limit: { count: 1 }
) {
Pool {
Market {
MarketAddress
BaseCurrency {
MintAddress
Symbol
Name
}
QuoteCurrency {
MintAddress
Symbol
Name
}
}
Dex {
ProtocolFamily
ProtocolName
}
Quote {
PostAmount
PriceInUSD
PostAmountInUSD
}
Base {
PostAmount
}
}
}
}
}