Solana Instructions API
Overviewβ
The Solana Instructions API provides comprehensive access to decoded instruction data executed on the Solana blockchain. This API enables you to track real-time instructions, monitor token creation and burning events, and analyze program interactions with detailed information including signer details, transaction signatures, balance updates, and program metadata.
π Table of Contentsβ
- Latest Solana Instructions - Real-time instruction monitoring
- Latest Created Tokens on Solana - Token creation tracking
- Newly launched tokens (PumpFun, Raydium, Meteora, Heaven, Bags, Jupiter, Moonit) - Multi-launchpad token launches
- Track Real-time Token Burn on Solana - Token burn monitoring
- Video Tutorials - Step-by-step guides
π Related APIsβ
- Solana Balance Updates API - Monitor real-time balance changes
- Solana Token Supply API - Track token supply and creation events
- Solana DEX Trades API - Monitor trading activities across DEXs
- Solana Transfers API - Track token transfers and movements
- Solana Fees API - Analyze transaction fees and costs
Latest Solana Instructionsβ
The subscription below fetches the latest instructions executed on the Solana blockchain, including details like indices of preceding instructions, signer information, transaction signatures, balance updates, and program details.
For monitoring the balance changes that result from these instructions, see our Solana Balance Updates API.
You can run the query here
subscription {
Solana(network: solana) {
Instructions {
Transaction {
Signer
Signature
Result {
Success
ErrorMessage
}
Index
}
Instruction {
Logs
BalanceUpdatesCount
AncestorIndexes
TokenBalanceUpdatesCount
Program {
Name
Method
}
}
Block {
Time
Hash
}
}
}
}
Latest Created Tokens on Solanaβ
The query below fetches the latest created tokens on the Solana blockchain, including details like newly created token addresses (which appear as the first entry in the Accounts array). We are querying the Solana Token Program with address TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA and filtering for the latest created tokens using Method: {in: ["initializeMint", "initializeMint2", "initializeMint3"]}.
You can run the query here
subscription {
Solana {
Instructions(
where: {
Instruction: {
Program: {
Address: { is: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }
Method: {
in: ["initializeMint", "initializeMint2", "initializeMint3"]
}
}
}
Transaction: { Result: { Success: true } }
}
) {
Instruction {
Accounts {
Address
IsWritable
Token {
Mint
Owner
ProgramId
}
}
Program {
AccountNames
Address
}
}
Transaction {
Signature
Signer
}
}
}
}
Newly launched tokens on PumpFun, Raydium Launchpad, Meteora DBC, Heaven DEX, Bags, Jupiter studio, Moonitβ
Subscribe to newly launched tokens across multiple Solana launchpads and DEXs in a single subscription. The query filters for successful token-creation instructions from PumpFun (create / create_v2), Raydium Launchpad (initialize_v2), Meteora DBC (initialize_virtual_pool_with_spl_token), Heaven DEX (create_standard_liquidity_pool), Bags (Meteora DBC with Bags program), Jupiter studio (Meteora DBC with jups account), and Moonit (tokenMint).
subscription {
Solana {
Instructions(
where: {
Transaction: { Result: { Success: true } }
any: [
{ Instruction: { Program: { Method: { in: ["create", "create_v2"] }, Address: { is: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P" } } } }
{ Instruction: { Program: { Address: { is: "LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj" }, Method: { is: "initialize_v2" } } } }
{ Instruction: { Program: { Address: { is: "dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN" }, Method: { is: "initialize_virtual_pool_with_spl_token" } } } }
{ Instruction: { Program: { Address: { is: "HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o" }, Method: { is: "create_standard_liquidity_pool" } } } }
{ Instruction: { Program: { Address: { is: "dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN" }, Method: { is: "initialize_virtual_pool_with_spl_token" } }, Accounts: { includes: { Address: { is: "BAGSB9TpGrZxQbEsrEznv5jXXdwyP6AXerN8aVRiAmcv" } } } } }
{ Instruction: { Accounts: { includes: { Address: { endsWith: "jups" } } }, Program: { Address: { is: "dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN" }, Method: { is: "initialize_virtual_pool_with_spl_token" } } } }
{ Instruction: { Program: { Address: { is: "MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG" }, Method: { is: "tokenMint" } } } }
]
}
) {
Instruction {
Accounts {
Address
IsWritable
Token {
Mint
Owner
ProgramId
}
}
Logs
Program {
AccountNames
Address
Arguments {
Name
Type
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
}
}
}
Method
Name
}
}
Transaction {
Signature
}
}
}
}
Get Token Metadata using Metaplex of Newly Created Tokensβ
This query retrieves metadata for newly created tokens on Solana using the Metaplex program.
The metadata is returned is the JSON field, which includes fields such as name, symbol, uri, and more.
You can run the query here
You can also add the keyword subscription and track it in real-time.
{
Solana {
Instructions(
where: {Instruction: {Program: {Address: {is: "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}, Method: {is: "CreateMetadataAccountV3"}}}, Transaction: {Result: {Success: true}}}
limit: {count: 10}
orderBy: {descending: Block_Slot}
) {
Instruction {
Accounts {
Address
IsWritable
Token {
Mint
Owner
ProgramId
}
}
Program {
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_String_Value_Arg {
string
}
... on Solana_ABI_Integer_Value_Arg {
integer
}
}
Type
Name
}
Name
Method
}
Data
}
Transaction {
Signature
Signer
}
}
}
}
Number of Latest Created Tokens on Solanaβ
The query below fetches the count of the latest created tokens on the Solana blockchain which were created using initializeMint method.
You can run the query here
query MyQuery {
Solana(dataset: realtime, network: solana) {
Instructions(
where: {Instruction: {Program: {Address: {is: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}, Method: {is: "initializeMint"}}}}
limit: {count: 10}
) {
count
Block {
latest: Time(maximum: Block_Time)
oldest: Time(minimum: Block_Time)
}
}
}
}
Get Buyevent instruction detailsβ
Use the below query to get the BuyEvent instruction details. Test the query here.
subscription {
Solana {
Instructions(where: {
Instruction: {
Program: {
Method: {
is: "BuyEvent"
}
}
}
}) {
Transaction {
Signature
}
Instruction {
Program {
Method
Name
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
}
}
}
}
}
}
}
}
Track Real-time Token Burn on Solanaβ
Receive real-time updates on token burn events on the Solana blockchain. The query below applies a filter to only include instructions where the Program Method includes burn, indicating that we filter instructions related specifically to token burning. You can run it here
subscription {
Solana {
Instructions(
where: {
Instruction: { Program: { Method: { is: "burn" } } }
Transaction: { Result: { Success: true } }
}
) {
Instruction {
Accounts {
Address
IsWritable
Token {
Mint
Owner
ProgramId
}
}
Program {
AccountNames
Address
Name
Method
}
Logs
}
Transaction {
Signature
Signer
}
}
}
}
Latest token burns on Solanaβ
The query below fetches the latest token burn instructions on Solana by filtering for the Token Program (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA) where the method includes burn. The second address in the Accounts list is the token address being burnt.
You can run the query here.
{
Solana(network: solana) {
Instructions(
where: {
Instruction: {
Program: {
Method: { includes: "burn" }
Address: { is: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }
}
}
}
limit: { count: 10 }
orderBy: { descending: Block_Time }
) {
Instruction {
Program {
Method
Name
Address
}
Accounts {
Address
}
Index
BalanceUpdatesCount
}
Transaction {
Signature
}
Block {
Time
Slot
}
}
}
}
Balance updates for token burn instructionsβ
The query below uses the InstructionBalanceUpdates API to fetch balance updates that occur when token burn instructions execute. It filters for the Token Program (TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA) where the method includes burn, and returns balance deltas (Amount, PreBalance, PostBalance), currency details, and account info for each update.
You can run the query here.
{
Solana {
InstructionBalanceUpdates(
limit: { count: 20 }
where: {
Transaction: {}
Instruction: {
Program: {
Method: { includesCaseInsensitive: "burn" }
Address: { is: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" }
}
}
}
orderBy: { descending: Block_Time }
) {
BalanceUpdate {
Account {
Address
Owner
}
Amount
Currency {
Name
Symbol
MintAddress
Decimals
}
Index
AmountInUSD
PreBalance
PreBalanceInUSD
PostBalance
PostBalanceInUSD
}
Instruction {
Program {
Method
Address
}
}
Transaction {
Signature
FeePayer
}
Block {
Time
Height
}
}
}
}
Alternative: Token Burn Tracking via TokenSupplyUpdates APIβ
You can also track real-time token burn using the TokenSupplyUpdates API. Check out the following example.
For more comprehensive token supply tracking, see our Solana Token Supply API documentation.
{
Solana {
TokenSupplyUpdates(
where: { TokenSupplyUpdate: { Amount: { lt: "0" } } }
limit: { count: 20 }
orderBy: { descending: Block_Time }
) {
TokenSupplyUpdate {
Currency {
Name
Symbol
MintAddress
Decimals
}
Amount
AmountInUSD
PreBalance
PreBalanceInUSD
PostBalance
PostBalanceInUSD
Account {
Address
Owner
Token {
Owner
}
}
}
Block {
Time
Height
}
Instruction {
Program {
Address
Method
}
}
Transaction {
Signature
}
}
}
}
Video Tutorialsβ
How to Track New Liquidity Pools Created on Solana Raydium & Orca DEXβ
How to Get Newly Created Tokens on Solana Blockchain in Real-timeβ