Solana tokenStatistics - 1

Returns token supply updates and DEX trades by token on Solana, where currency mint address is 9doRRA…pump or 3t6cBh…pump, sorted by block slot, highest first: post balance, post balance in USD, currency mint address, side currency mint address, price in USD, count, sum of balance update amount and currency name.

By Aleksey · saved 15 January 2025 · Bitquery API v2

What it returns

Filters

The query

query tokenStatistics($baseTokenMintAddress: [String!]) {
  Solana(aggregates: only) {
    TokenSupplyUpdates(
      where: {TokenSupplyUpdate: {Currency: {MintAddress: {in: $baseTokenMintAddress}}}}
      orderBy: {descending: Block_Slot}
      limitBy: {by: TokenSupplyUpdate_Currency_MintAddress}
    ) {
      TokenSupplyUpdate {
        PostBalance(maximum: Block_Slot)
        PostBalanceInUSD(maximum: Block_Slot)
        Currency {
          MintAddress
        }
      }
    }
    DEXTradeByTokens(
      where: {Transaction: {Result: {Success: true}}, Trade: {Currency: {MintAddress: {in: $baseTokenMintAddress}}}}
      limitBy: {by: Trade_Currency_MintAddress}
    ) {
      Trade {
        Currency {
          MintAddress
        }
        Side {
          Currency {
            MintAddress
          }
        }
        priceInUSDLast: PriceInUSD(maximum: Block_Slot)
      }
    }
    BalanceUpdates(
      where: {BalanceUpdate: {Currency: {MintAddress: {in: $baseTokenMintAddress}}}, Transaction: {Result: {Success: true}}}
      limitBy: {by: BalanceUpdate_Currency_MintAddress}
    ) {
      holderCount: count(distinct: BalanceUpdate_Account_Owner)
      totalBalance: sum(of: BalanceUpdate_Amount)
      BalanceUpdate {
        Currency {
          MintAddress
          Name
        }
      }
    }
  }
}

Variables

{"baseTokenMintAddress":["9doRRAik5gvhbEwjbZDbZR6GxXSAfdoomyJR57xKpump","3t6cBhuQn445zZSfAmJdmRDaWdPP8WgUTxa5QfgTpump"]}

Similar queries