Solana_Token_Info CP

Returns 10 token supply updates and DEX trades by token on Solana, where block time since now-24h, sorted by balance update post balance, highest first: currency name, currency symbol, currency mint address, decimals, update authority, is mutable, URI and 21 more fields.

By CP Singh · saved 19 April 2025 · Bitquery API v2

What it returns

Filters

The query

query TokenInformation($tokenMint: String!) {
  Solana(dataset:realtime) {
    # TOKEN DETAILS & SUPPLY
    tokenSupply: TokenSupplyUpdates(
      limit: {count: 1}
      orderBy: {descending: Block_Time}
      where: {
        TokenSupplyUpdate: {
          Currency: {MintAddress: {is: $tokenMint}}
        }
      }
    ) {
      TokenSupplyUpdate {
        Currency {
          Name
          Symbol
          MintAddress
          Decimals
          UpdateAuthority
          IsMutable
          Uri
        }
        Amount                # Total supply
        supply: PostBalance   # Current supply
        AmountInUSD           # USD value of supply
      }
      Block {
        Time
      }
    }
    
    # CURRENT PRICE ACROSS MAJOR DEXES
    tokenPrice: DEXTradeByTokens(
      limit: {count: 1}
      orderBy: {descending: Block_Time}
      where: {
        Trade: {
          Currency: {MintAddress: {is: $tokenMint}}
        },
        Transaction: {Result: {Success: true}}
      }
    ) {
      Trade {
        Currency {
          Symbol
          Name
        }
        Price
        PriceInUSD
        Market {
          MarketAddress
        }
        Dex {
          ProtocolName
          ProtocolFamily
        }
      }
      Block {
        Time
      }
    }
    
    # PRICE HISTORY & ATH/ATL
    priceHistory: DEXTradeByTokens(
      where: {
        Trade: {
          Currency: {MintAddress: {is: $tokenMint}}
        }
      }
    ) {
      Trade {
        ATH: PriceInUSD(maximum: Trade_PriceInUSD)
        ATL: PriceInUSD(minimum: Trade_PriceInUSD)
        startPrice: PriceInUSD(minimum: Block_Time)
        currentPrice: PriceInUSD(maximum: Block_Time)
      }
    }
    
    # LIQUIDITY POOLS INFORMATION
    liquidityPools: DEXPools(
      orderBy: {descendingByField: "Pool_Quote_PostAmountInUSD_maximum"}
      where: {
        Pool: {
          Market: {
            BaseCurrency: {MintAddress: {is: $tokenMint}}
          }
        }
      }
    ) {
      Pool {
        Market {
          MarketAddress
          QuoteCurrency {
            Symbol
            Name
            MintAddress
          }
        }
        Dex {
          ProtocolName
          ProtocolFamily
        }
        # Base token amount in pool
        Base {
          PostAmount(maximum: Block_Slot)
          PostAmountInUSD(maximum: Block_Slot)
        }
        # Quote token amount in pool (liquidity)
        Quote {
          PostAmount(maximum: Block_Slot)
          PostAmountInUSD(maximum: Block_Slot)
        }
      }
      # Total liquidity across all pools
      totalLiquidityUSD: sum(of: Pool_Quote_PostAmountInUSD)
    }
    
    # 24H TRADING VOLUME
    tradingVolume: DEXTradeByTokens(
      where: {
        Block: {Time: {since: "now-24h"}},
        Trade: {
          Currency: {MintAddress: {is: $tokenMint}}
        },
        Transaction: {Result: {Success: true}}
      }
    ) {
      volume24h: sum(of: Trade_AmountInUSD)
      tradeCount: count
    }
    
    # TOP HOLDERS (OPTIONAL)
    topHolders: BalanceUpdates(
      limit: {count: 10}
      orderBy: {descendingByField: "BalanceUpdate_PostBalance"}
      where: {
        BalanceUpdate: {
          Currency: {MintAddress: {is: $tokenMint}}
        },
        Transaction: {Result: {Success: true}}
      }
    ) {
      BalanceUpdate {
        Account {
          Address
          Owner
        }
        PostBalance(maximum: Block_Slot)
      }
    }
  }
}

Variables

{
  "tokenMint": "9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump"  // For SOL wrapped token
}

Similar queries