Solana Token Supply API
In this section we will see how to get Solana Token Supply information using our API.
Overview​
The Solana Token Supply API provides comprehensive access to real-time token supply data on the Solana blockchain. This API enables you to track token creation, monitor supply changes, calculate market capitalization, and analyze token burn events with detailed metadata and real-time updates.
📋 Table of Contents​
- Subscribe to Token Supply Changes - Real-time supply monitoring
- Get Supply of Specific Token - Individual token supply tracking
- Token Creation Tracking - New token creation events
- Market Cap Analysis - Market capitalization queries
- Token Burn Events - Burn event monitoring
- Video Tutorials - Step-by-step guides
🔗 Related Solana APIs​
- Solana Instructions API - Track token creation and burn instructions
- Solana Balance Updates API - Monitor balance changes from supply updates
- Solana Transfers API - Track transfers that affect token supply
- Solana DEX Trades API - Monitor trading activities impacting supply
- Solana Fees API - Analyze fees from supply-related transactions
Subscribe to Token Supply Changes​
This subscription will return the token supply changes in realtime. PostBalance
will give you the current supply. Check the query here
For tracking the instructions that cause these supply changes (like token creation and burning), see our Solana Instructions API.
subscription {
Solana {
TokenSupplyUpdates {
TokenSupplyUpdate {
Amount
Currency {
MintAddress
Name
}
PreBalance
PostBalance
}
}
}
}
Get Supply of specific Token​
This query will return the latest token supply of a specific token. We are getting here supply for this 6D7NaB2xsLd7cauWu1wKk6KBsJohJmP2qZH9GEfVi5Ui
token PostBalance
will give you the current supply for this token. Check the query here
{
Solana {
TokenSupplyUpdates(
limit: { count: 1 }
orderBy: { descending: Block_Time }
where: {
TokenSupplyUpdate: {
Currency: { MintAddress: { is: "token mint address" } }
}
}
) {
TokenSupplyUpdate {
Amount
Currency {
MintAddress
Name
}
PreBalance
PostBalance
}
}
}
}
Token Creation Tracking​
Get newly created Pump Fun tokens, Creation Time, Dev Address, Metadata​
Now you can track the newly created Pump Fun Tokens along with their dev address, metadata and supply. PostBalance
will give you the current supply for the token. Check the query here
subscription {
Solana {
TokenSupplyUpdates(
where: {
Instruction: {
Program: {
Address: { is: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P" }
Method: { is: "create" }
}
}
}
) {
Block {
Time
}
Transaction {
Signer
}
TokenSupplyUpdate {
Amount
Currency {
Symbol
ProgramAddress
PrimarySaleHappened
Native
Name
MintAddress
MetadataAddress
Key
IsMutable
Fungible
EditionNonce
Decimals
Wrapped
VerifiedCollection
Uri
UpdateAuthority
TokenStandard
}
PostBalance
}
}
}
}
Get newly created Moonshot tokens and their Metadata​
Now you can track the newly created Moonshot Tokens along with their metadata and supply. PostBalance
will give you the current supply for the token. Check the query here
subscription {
Solana {
TokenSupplyUpdates(
where: {
Instruction: {
Program: {
Address: { is: "MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG" }
Method: { is: "tokenMint" }
}
}
}
) {
TokenSupplyUpdate {
Amount
Currency {
Symbol
ProgramAddress
PrimarySaleHappened
Native
Name
MintAddress
MetadataAddress
Key
IsMutable
Fungible
EditionNonce
Decimals
Wrapped
VerifiedCollection
Uri
UpdateAuthority
TokenStandard
}
PostBalance
}
}
}
}
Market Cap Analysis​
Top 10 Solana tokens with the highest marketcap increase in last 1hr​
Use below query to get top 10 marketcap jump tokens in last 1hr. Test the query here
query MyQuery {
Solana {
TokenSupplyUpdates(
limit: {count: 10}
orderBy: {descendingByField: "marketcapJump"}
where: {Transaction: {Result: {Success: true}}, Block: {Time: {since_relative: {minutes_ago: 60}}}}
) {
TokenSupplyUpdate {
AmountInUSD
pre: PreBalanceInUSD
post: PostBalanceInUSD
Currency {
MintAddress
Name
Symbol
Decimals
}
}
marketcapJump: calculate(
expression: "(($TokenSupplyUpdate_post - $TokenSupplyUpdate_pre) / $TokenSupplyUpdate_pre) * 100"
)
}
}
}
Marketcap of a Token​
We use PostBalanceInUSD
field to get the marketcap. Since it is built on real-time data, you will get the Marketcap if the token was active in the past 8 hours or is being transacted in real-time.
This query returns latest marketcap of a particular token.
query MyQuery {
Solana {
TokenSupplyUpdates(
where: {
TokenSupplyUpdate: {
Currency: { MintAddress: { is: "token mint address" } }
}
}
limit: { count: 1 }
orderBy: { descending: Block_Time }
) {
TokenSupplyUpdate {
PostBalanceInUSD
}
}
}
}
In case PostAmountInUSD is 0 then, you need to pull price from our Crypto price API. Here is an example which gets both supply and Price.
{
Solana {
TokenSupplyUpdates(
where: {TokenSupplyUpdate: {Currency: {MintAddress: {is: "4iBhvT6bpCf92u12P1kpbejYrHDS6N3hJCNtAq6wpump"}}}}
limit: {count: 1}
orderBy: {descending: Block_Time}
) {
TokenSupplyUpdate {
Currency {
Name
Symbol
MintAddress
Decimals
}
PostBalance
PostBalanceInUSD
}
}
}
Trading {
Tokens(
limit: {count: 1}
where: {Price: {IsQuotedInUsd: true}, Interval: {Time: {Duration: {eq: 1}}}, Token: {Address: {is: "4iBhvT6bpCf92u12P1kpbejYrHDS6N3hJCNtAq6wpump"}}}
) {
Block {
Time(maximum: Block_Time)
}
Price {
Average {
Mean
}
}
}
}
}
Monitor Market Cap Metric for a Pump Fun Token​
The subscription given below could be used to setup a websocket like solution that monitors market cap of a Pump Fun token in real time, where the PostBalanceInUSD
is essentially the marketcap of the token.
subscription {
Solana {
TokenSupplyUpdates(
where: {
TokenSupplyUpdate: {
Currency: { MintAddress: { is: "token mint address" } }
}
}
limitBy: { by: TokenSupplyUpdate_Currency_MintAddress, count: 1 }
) {
TokenSupplyUpdate {
PostBalanceInUSD
}
}
}
}
Top Solana Tokens By MarketCap​
This query returns the top Solana tokens based on the latest MarketCap.
query MyQuery {
Solana {
TokenSupplyUpdates(
orderBy: {
descending: Block_Time
descendingByField: "TokenSupplyUpdate_Marketcap"
}
limitBy: { by: TokenSupplyUpdate_Currency_MintAddress, count: 1 }
) {
TokenSupplyUpdate {
Marketcap: PostBalanceInUSD
Currency {
Name
Symbol
MintAddress
Fungible
Decimals
}
}
}
}
}
Top 100 Pump Fun Tokens By MarketCap​
This query returns the top Solana tokens based on the latest MarketCap.
query MyQuery {
Solana {
TokenSupplyUpdates(
where: {
TokenSupplyUpdate: { Currency: { MintAddress: { includes: "pump" } } }
}
orderBy: {
descending: Block_Time
descendingByField: "TokenSupplyUpdate_Marketcap"
}
limitBy: { by: TokenSupplyUpdate_Currency_MintAddress, count: 1 }
limit: { count: 100 }
) {
TokenSupplyUpdate {
Marketcap: PostBalanceInUSD
Currency {
Name
Symbol
MintAddress
Fungible
Decimals
Uri
}
}
}
}
}
Get Solana Tokens With a Specific MarketCap​
Lets say we need to get the tokens whose marketcap has crossed the 1M USD
mark but is less than 2M USD
for various reasons like automated trading. We can get the token details that have crossed a particular marketcap using this query.
query MyQuery {
Solana {
TokenSupplyUpdates(
where: {
TokenSupplyUpdate: {
PostBalanceInUSD: { ge: "1000000", le: "2000000" }
}
}
orderBy: { descending: Block_Time }
limitBy: { by: TokenSupplyUpdate_Currency_MintAddress, count: 1 }
) {
TokenSupplyUpdate {
Marketcap: PostBalanceInUSD
Currency {
Name
Symbol
MintAddress
Decimals
Uri
}
}
}
}
}
Token Burn Events​
Get Latest Token Burn Events on Solana​
We will be using the token supply API to query recent token liquidity removals (token burn). You can modify this query to track burn events of a specific token using Currency
filter in real time or query it.
You can run the query here
query MyQuery {
Solana(network: solana) {
TokenSupplyUpdates(
where: {
Instruction: { Program: { Method: { in: ["Burn"] } } }
TokenSupplyUpdate: {}
}
limit: { count: 100 }
orderBy: { descending: Block_Time }
) {
TokenSupplyUpdate {
PostBalanceInUSD
PostBalance
Amount
Currency {
Name
MintAddress
}
}
Instruction {
Program {
Name
Method
}
}
}
}
}