Skip to main content

Solana Instructions API

This Solana API is part of our Early Access Program (EAP), which is intended for evaluation purposes.

This program allows you to test the data and its integration into your applications before full-scale implementation. Read more here

Latest Solana Instructions

The subscription below fetches the latest instructions executed on the Solana blockchain including details like indices of preceding instructions signer, signature, balance updates, and program details

You can run the query here

subscription {
Solana(network: solana) {
Instructions(limit: {count: 10}, orderBy: {descending: Block_Time}) {
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 address which is the 1st entry in the Accounts array. We are querying Solana Token Program here with address TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA and filtering for 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"]}}}, Transaction: {Result: {Success: true}}}
) {
Instruction {
Accounts {
Address
IsWritable
Token {
Mint
Owner
ProgramId
}
}
Program {
AccountNames
Address
}
}
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 Authorities of tokens on Solana

The query below fetches all the authorities such as mint authority, freeze authority and update authority and also the token address on the Solana blockchain in realtime. The 1st entry in the Accounts array is the mint and the freeze authority, 2nd entry in the Accounts array is the token address, and 3rd entry in the Accounts array is the update authority.

You can run the query here

subscription{
Solana {
Instructions(
where: {Instruction: {Program: {Address: {is: "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}, Method: {is: "CreateMasterEditionV3"}}}}
) {
Instruction {
Accounts {
Address
}
Program {
Method
AccountNames
Address
Name
}
}
}
}
}




Track Real-time Token Burn on Solana

Receive real-time updates on token burn events on the Solana blockchain. The below query applies a filter to only include instructions where Program Method includes burn, indicating that we filter instructions only related to token burning.


subscription {
Solana {
Instructions(
where: {Instruction: {Program: {Method: {includes: "burn"}}}, Transaction: {Result: {Success: true}}}
) {
Instruction {
Accounts {
Address
IsWritable
Token {
Mint
Owner
ProgramId
}
}
Program {
AccountNames
Address
Name
Method
}
Logs
}
Transaction {
Signature
Signer
}
}
}
}

Video Tutorial on Solana Instructions API | How to track New Liquidity Pools Created on Solana Raydium & Orca DEX

Video Tutorial on Solana Instructions API | How to get newly created tokens on Solana Blockchain in realtime