Raydium Launchpad API
In this section we see how to get data on Launchpad by Raydium. This includes token creation, latest trades by trader, for a token etc.
These APIs can be provided through different streams including Kafka for zero latency requirements. Please contact us on telegram.
Latest Pools Created on Launchpad
We will use the PoolCreateEvent
method to filter latest pools on Launchpad. The Argument
filed includes more information about the pool like base_mint_param
( token details), curve_param
( bonding curve details) and vesting_param
( cliff period, amount locked etc).
You can run the query here
{
Solana(network: solana, dataset: realtime) {
Instructions(
where: {Instruction: {Program: {Address: {is: "LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj"}, Method: {is: "PoolCreateEvent"}}}}
orderBy: {descending: Block_Time}
) {
Instruction {
Accounts {
Address
}
Program {
Name
Method
AccountNames
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
}
}
}
}
}
}
}
}
Latest Trades on Launchpad
This query fetches the most recent trades on the Raydium Launchpad. You can run the query here
query LatestTrades {
Solana {
DEXTradeByTokens(
orderBy: {descending: Block_Time}
limit: {count: 50}
where: {Trade: {Dex: {ProtocolName: {is: "raydium_launchpad"}}}}
) {
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 Token on Launchpad
This query provides the most recent price data for a specific token launched on Raydium Launchpad. You can filter by the token’s MintAddress
, and the query will return the last recorded trade price.
You can run the query here
{
Solana {
DEXTradeByTokens(
orderBy: {descending: Block_Time}
limit: {count: 1}
where: {Trade: {Dex: {ProtocolName: {is: "raydium_launchpad"}}, Currency: {MintAddress: {is: "5SA3y1LSB55D36G6BYXwqpEXZferX5zosSdQuky7aray"}}}}
) {
Block {
Time
}
Transaction {
Signature
}
Trade {
Market {
MarketAddress
}
Dex {
ProtocolName
ProtocolFamily
}
AmountInUSD
PriceInUSD
Amount
Currency {
Name
}
Side {
Type
Currency {
Symbol
MintAddress
Name
}
AmountInUSD
Amount
}
}
}
}
}
Latest Trades of an User on Launchpad
This query returns the latest trades by a user on Launchpad by filtering on the basis of Transaction_Signer
. This stream of data allows to monitor the trade activities of the user on Launchpad in real time.
query MyQuery {
Solana {
DEXTradeByTokens(
where: {Trade: {Dex: {ProtocolName: {is: "raydium_launchpad"}}}, Transaction: {Signer: {is: "8KjdBwz6Q3EYUDYmqfg33em3p9GFcP48v3ghJmw2KDNe"}}}
orderBy: {descending: Block_Time}
limit: {count: 100}
) {
Trade {
Currency {
MintAddress
Name
Symbol
}
Market {
MarketAddress
}
usd_price: PriceInUSD
sol_price: Price
Side {
Currency {
Symbol
Name
MintAddress
}
Type
}
}
}
}
}
Top Buyers of a Token on LaunchPad
This API endpoint returns the top 100 buyers for a token, which is 8CgTj1bVFPVFN9AgY47ZfXkMZDRwXawQ2vckp1ziqray
in this case.
query MyQuery {
Solana {
DEXTradeByTokens(
where: {Trade: {Dex: {ProtocolName: {is: "raydium_launchpad"}}, Currency: {MintAddress: {is: "8CgTj1bVFPVFN9AgY47ZfXkMZDRwXawQ2vckp1ziqray"}}, 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 8CgTj1bVFPVFN9AgY47ZfXkMZDRwXawQ2vckp1ziqray
could be retrieved.
query MyQuery {
Solana {
DEXTradeByTokens(
where: {Trade: {Dex: {ProtocolName: {is: "raydium_launchpad"}}, Currency: {MintAddress: {is: "8CgTj1bVFPVFN9AgY47ZfXkMZDRwXawQ2vckp1ziqray"}}, 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 LaunchPad Tokens
This API end point returns the OHLCV vlaues for a LaunchPad token with the currency mint address
as 72j7mBkX54KNH7djeJ2mUz5L8VoDToPbSQTd24Sdhray
when traded against WSOL.
query MyQuery {
Solana {
DEXTradeByTokens(
where: {Trade: {Dex: {ProtocolName: {is: "raydium_launchpad"}}, Currency: {MintAddress: {is: "72j7mBkX54KNH7djeJ2mUz5L8VoDToPbSQTd24Sdhray"}}, 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 Liquidity Pool Address for a LaunchPad Token
This query returns the pair address for the LaunchPad token with mint address
as 72j7mBkX54KNH7djeJ2mUz5L8VoDToPbSQTd24Sdhray
on the LaunchPad exchange. The liquidity pool address is denoted by MarketAddress
.
query MyQuery {
Solana {
DEXTradeByTokens(
where: {Trade: {Dex: {ProtocolName: {is: "raydium_launchpad"}}, Currency: {MintAddress: {is: "72j7mBkX54KNH7djeJ2mUz5L8VoDToPbSQTd24Sdhray"}}}}
) {
Trade {
Market {
MarketAddress
}
Currency {
Name
Symbol
MintAddress
}
Side {
Currency {
Name
Symbol
MintAddress
}
}
}
count
}
}
}
Get Liquidity for a LaunchPad 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 H5875KoMLaWAovsjjXuTtHZv9otmH7EgJ2nXMovykZvp
.
{
Solana {
DEXPools(
where: {
Pool: {Market: {MarketAddress: {is: "H5875KoMLaWAovsjjXuTtHZv9otmH7EgJ2nXMovykZvp"}}},
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
}
}
}
}
}
}
This subscription could be utilised to monitor updates in liquidity pools in real time.