LetsBonk.Fun API - Solana - New Tokens, Trades, Live Prices
In this document, we will explore several examples related to LetsBonk.fun. You can also check out our Pump Fun API Docs and FourMeme API Docs.
LetsBonk.fun tokens are created and traded on Raydium Launchlab.
Need zero-latency LetsBonk.fun data? Read about our Shred Streams and Contact us for a Trial.
To query or stream data via graphQL outside the Bitquery IDE, you need to generate an API access token.
Follow the steps here to create one: How to generate Bitquery API token ➤
If you want fastest data without any latency, we can provide Kafka streams, please fill this form for it. Our Team will reach out.
Track LetsBonk.fun Token Creation​
Using this query, we can get the realtime created LetsBonk.fun tokens.
Click to expand GraphQL query
subscription {
Solana {
Instructions(
where: {
Instruction: {
Program: {
Address: { is: "LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj" }
Method: { is: "initialize_v2" }
}
Accounts: {
includes: {
Address: { is: "FfYek5vEz23cMkWsdJwG2oa6EphsvXSHrGpdALN4g6W1" }
}
}
}
Transaction: { Result: { Success: true } }
}
) {
Block {
Time
}
Instruction {
Accounts {
Address
IsWritable
Token {
Mint
Owner
ProgramId
}
}
Program {
AccountNames
Address
Arguments {
Name
Type
Value {
... on Solana_ABI_Integer_Value_Arg {
integer
}
... on Solana_ABI_String_Value_Arg {
string
}
... on Solana_ABI_Address_Value_Arg {
address
}
... on Solana_ABI_BigInt_Value_Arg {
bigInteger
}
... on Solana_ABI_Bytes_Value_Arg {
hex
}
... on Solana_ABI_Boolean_Value_Arg {
bool
}
... on Solana_ABI_Float_Value_Arg {
float
}
... on Solana_ABI_Json_Value_Arg {
json
}
}
}
Method
Name
}
}
Transaction {
Signature
Signer
}
}
}
}
Bonding Curve Progress API​
Below query will give you the Bonding curve progress percentage of a specific LetsBonk.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 (LetsBonk.fun Token)reservedTokens
: 206,900,000- Therefore,
initialRealTokenReserves
: 793,100,000
leftTokens
=realTokenReserves
-reservedTokens
realTokenReserves
: Token balance at the market address.
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.
- The
Click to expand GraphQL query
query GetBondingCurveProgressPercentage {
Solana {
DEXPools(
limit: { count: 1 }
orderBy: { descending: Block_Slot }
where: {
Pool: {
Market: {
BaseCurrency: {
MintAddress: {
is: "CctsjizSC6pwf2T8bhdHdZTEV4PEcfXoumjeK7FBbonk"
}
}
}
Dex: {
ProgramAddress: {
is: "LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj"
}
}
}
}
) {
Bonding_Curve_Progress_precentage: 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 LetsBonk.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. Run the query: LetsBonk.fun tokens between 95–100% bonding-curve progress ➤.
Click to expand GraphQL query
subscription MyQuery {
Solana {
DEXPools(
where: {
Pool: {
Base: { PostAmount: { gt: "206900000", lt: "246555000" } }
Dex: {
ProgramAddress: {
is: "LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj"
}
}
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 LetsBonk.fun Tokens​
We can use below query to get top 100 About to Graduate LetsBonk.fun Tokens. Run the query: Top 100 tokens about to graduate (Raydium LaunchLab) ➤.
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: "LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj"
}
}
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
}
}
}
}
}
Get all the instructions of Raydium LaunchLab​
Below query will get you all the instructions that the Raydium LaunchLab Program has. Run the query: All instructions of Raydium LaunchLab program ➤.
Click to expand GraphQL query
query MyQuery {
Solana {
Instructions(
where: {Instruction: {Program: {Address: {is: "LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj"}}}}
) {
Instruction {
Program {
Method
}
}
count
}
}
}
Track LetsBonk.fun Token Migrations to Raydium DEX and Raydium CPMM in Realtime​
Using above get all instructions
api, you will figure out that there are 2 instructions migrate_to_amm
, migrate_to_cpswap
whose invocations migrate the Raydium LaunchLab Token to Raydium V4 AMM and Raydium CPMM Dexs respectively.
Thats why we have filtered for these 2 instructions in the below API, and tracking these. And FfYek5vEz23cMkWsdJwG2oa6EphsvXSHrGpdALN4g6W1
is the LetsBonk.fun Platform address, and we are filtering for the instructions where the above listed methods are invoked and the letsbonk.fun platform config address is present in Instruction Accounts Array.
Run the stream: Track LetsBonk.fun token migrations to Raydium ➤.
Click to expand GraphQL query
subscription MyQuery {
Solana {
Instructions(
where: {Instruction: {Program: {Address: {is: "LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj"}, Method: {in: ["migrate_to_amm", "migrate_to_cpswap"]}}, Accounts: {includes: {Address: {is: "FfYek5vEz23cMkWsdJwG2oa6EphsvXSHrGpdALN4g6W1"}}}}, Transaction: {Result: {Success: true}}}
) {
Block {
Time
}
Instruction {
Program {
Method
AccountNames
Address
Arguments {
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_Integer_Value_Arg {
integer
}
... on Solana_ABI_String_Value_Arg {
string
}
}
Type
Name
}
Name
}
Accounts {
Address
IsWritable
Token {
ProgramId
Owner
Mint
}
}
}
Transaction {
Signature
Signer
}
}
}
}
Track LetsBonk.fun, Raydium Launchlab, Meteora DBC, Boop.fun and Moonshot Token Migrations in a single subscription​
Use this single subscription to stream real-time token migration events across Boop.fun, Raydium Launchlab, Meteora DBC, and Moonshot. It filters by the respective program IDs and migration methods, returning block time, program details, involved accounts, and transaction signatures as events occur.
Try out the API here on IDE.
Click to expand GraphQL query
subscription{
Solana {
Instructions(
where: {any: [{Instruction: {Program: {Address: {is: "LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj"}, Method: {is: "initialize_v2"}}}}, {Instruction: {Program: {Address: {is: "boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4"}, Method: {is: "graduate"}}}}, {Instruction: {Program: {Address: {is: "MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG"}, Method: {is: "migrateFunds"}}}}, {Instruction: {Program: {Address: {is: "dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"}, Method: {in: ["migrate_meteora_damm", "migration_damm_v2"]}}}}, {Instruction: {Program: {Address: {is: "LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj"}, Method: {in: ["migrate_to_amm", "migrate_to_cpswap"]}}, Accounts: {includes: {Address: {is: "FfYek5vEz23cMkWsdJwG2oa6EphsvXSHrGpdALN4g6W1"}}}}}], Transaction: {Result: {Success: true}}}
) {
Block {
Time
}
Instruction {
Accounts {
Address
IsWritable
Token {
Mint
Owner
ProgramId
}
}
Program {
AccountNames
# LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj - Launchlab
# boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4 - boop.fun
# MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG - Moonshot/Moonit
# dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN - Meteora DBC
# LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj - Program Address and FfYek5vEz23cMkWsdJwG2oa6EphsvXSHrGpdALN4g6W1(letsbonk.fun platform config addr) is present in Accounts array then its Letsbonk.fun migration
Address
Arguments {
Name
Type
Value {
... on Solana_ABI_Integer_Value_Arg {
integer
}
... on Solana_ABI_String_Value_Arg {
string
}
... on Solana_ABI_Address_Value_Arg {
address
}
... on Solana_ABI_BigInt_Value_Arg {
bigInteger
}
... on Solana_ABI_Bytes_Value_Arg {
hex
}
... on Solana_ABI_Boolean_Value_Arg {
bool
}
... on Solana_ABI_Float_Value_Arg {
float
}
... on Solana_ABI_Json_Value_Arg {
json
}
}
}
Method
Name
}
}
Transaction {
Signature
Signer
}
}
}
}
Latest Trades of a LetsBonk.fun token on Launchpad​
This query fetches the most recent trades of a LetsBonk.fun Token token Mint Address
on the Raydium Launchpad.
Run the query: Latest trades of a LetsBonk.fun token ➤
Click to expand GraphQL query
query LatestTrades {
Solana {
DEXTradeByTokens(
orderBy: { descending: Block_Time }
limit: { count: 50 }
where: {
Trade: {
Dex: { ProtocolName: { is: "raydium_launchpad" } }
Currency: { MintAddress: { is: "token Mint Address" } }
}
}
) {
Block {
Time
}
Transaction {
Signature
}
Trade {
Market {
MarketAddress
}
Dex {
ProtocolName
ProtocolFamily
}
AmountInUSD
PriceInUSD
Amount
Currency {
Name
}
Side {
Type
Currency {
Symbol
MintAddress
Name
}
AmountInUSD
Amount
}
}
}
}
}
Similarly, you can subscribe to trades on launchpad in real-time using subscription query. The same can be tracked using Bitquery Kafka Streams
Latest Price of a LetsBonk.fun Token on Raydium Lanchlab​
This query provides the most recent price data for a specific LetsBonk.fun token token Mint Address
launched on Raydium Launchpad. You can filter by the token’s MintAddress
, and the query will return the last recorded trade price.
Run the query: Latest price of a LetsBonk.fun token ➤
Click to expand GraphQL query
{
Solana {
DEXTradeByTokens(
orderBy: { descending: Block_Time }
limit: { count: 1 }
where: {
Trade: {
Dex: { ProtocolName: { is: "raydium_launchpad" } }
Currency: { MintAddress: { is: "token Mint Address" } }
}
}
) {
Block {
Time
}
Transaction {
Signature
}
Trade {
Market {
MarketAddress
}
Dex {
ProtocolName
ProtocolFamily
}
AmountInUSD
PriceInUSD
Amount
Currency {
Name
}
Side {
Type
Currency {
Symbol
MintAddress
Name
}
AmountInUSD
Amount
}
}
}
}
}
Top Buyers of a LetsBonk.fun Token on LaunchPad​
This API endpoint returns the top 100 buyers for a token, which is token Mint Address
in this case.
Click to expand GraphQL query
query MyQuery {
Solana {
DEXTradeByTokens(
where: {
Trade: {
Dex: { ProtocolName: { is: "raydium_launchpad" } }
Currency: { MintAddress: { is: "token Mint Address" } }
Side: { Type: { is: buy } }
}
}
orderBy: { descendingByField: "buy_volume" }
limit: { count: 100 }
) {
Trade {
Currency {
MintAddress
Name
Symbol
}
}
Transaction {
Signer
}
buy_volume: sum(of: Trade_Side_AmountInUSD)
}
}
}
Top Sellers of a Token on LaunchPad​
Using this query top 100 sellers for the token with Mint Address
as token Mint Address
could be retrieved.
Click to expand GraphQL query
query MyQuery {
Solana {
DEXTradeByTokens(
where: {
Trade: {
Dex: { ProtocolName: { is: "raydium_launchpad" } }
Currency: { MintAddress: { is: "token Mint Address" } }
Side: { Type: { is: sell } }
}
}
orderBy: { descendingByField: "sell_volume" }
limit: { count: 100 }
) {
Trade {
Currency {
MintAddress
Name
Symbol
}
}
Transaction {
Signer
}
sell_volume: sum(of: Trade_Side_AmountInUSD)
}
}
}
OHLCV for specific LetsBonk.fun Token on Raydium Launchlab​
This API end point returns the OHLCV vlaues for a LetsBonk.fun token with the currency mint address
as token mint address
when traded against WSOL.
Click to expand GraphQL query
query MyQuery {
Solana {
DEXTradeByTokens(
where: {
Trade: {
Dex: { ProtocolName: { is: "raydium_launchpad" } }
Currency: { MintAddress: { is: "token Mint Address" } }
Side: {
Currency: {
MintAddress: { is: "So11111111111111111111111111111111111111112" }
}
}
}
Transaction: { Result: { Success: true } }
}
limit: { count: 100 }
orderBy: { descendingByField: "Block_Timefield" }
) {
Block {
Timefield: Time(interval: { count: 1, in: minutes })
}
Trade {
open: Price(minimum: Block_Slot)
high: Price(maximum: Trade_Price)
low: Price(minimum: Trade_Price)
close: Price(maximum: Block_Slot)
}
volumeInUSD: sum(of: Trade_Side_AmountInUSD)
count
}
}
}
Get Pair Address for a LetsBonk.fun Token​
This query returns the pair address for the LetsBonk.fun token with mint address
as token Mint Address
on the LaunchPad exchange. The liquidity pool address is denoted by MarketAddress
.
Click to expand GraphQL query
query MyQuery {
Solana {
DEXTradeByTokens(
where: {
Trade: {
Dex: { ProtocolName: { is: "raydium_launchpad" } }
Currency: { MintAddress: { is: "token Mint Address" } }
}
}
) {
Trade {
Market {
MarketAddress
}
Currency {
Name
Symbol
MintAddress
}
Side {
Currency {
Name
Symbol
MintAddress
}
}
}
count
}
}
}
Get Liquidity for a LetsBonk.fun Token Pair Address​
Using this query we can get the liquidity for a LaunchPad Token Pair, where Base_PostBalance
is the amount of LaunchPad tokens present in the pool and Quote_PostBalance
is the amount of WSOL present in the pool. For the purpose of filtering we are applying the condition that the MarketAddress
is insert pool address
.
Click to expand GraphQL query
{
Solana {
DEXPools(
where: {
Pool: { Market: { MarketAddress: { is: "token pool address" } } }
Transaction: { Result: { Success: true } }
}
orderBy: { descending: Block_Time }
limit: { count: 1 }
) {
Pool {
Base {
PostAmount
}
Quote {
PostAmount
}
Market {
BaseCurrency {
MintAddress
Name
Symbol
}
QuoteCurrency {
MintAddress
Name
Symbol
}
}
}
}
}
}