query fatty

Returns the latest 60 DEX trades by token on Solana, where currency mint address is Eyc4oz…bonk, side currency mint address is So1111…1112 and block time after 2025-08-19: block time, sum of trade side amount in USD, quantile of trade price in USD, price in USD and trade price.

By gaurav · saved 19 August 2025 · run 2 times · Bitquery API v2

What it returns

Filters

The query

query SolanaTokenPrice($tokenAddress: String!, $quoteTokenAddresses: [String!]!, $timeInterval: OLAP_DateTimeIntervalUnits!, $intervalCount: Int!, $limit: Int!, $after: DateTime, $before: DateTime) {
  Solana(dataset: combined) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "Block_timestamp"}
      where: {Block: {Time: {after: $after, before: $before}}, Trade: {Currency: {MintAddress: {is: $tokenAddress}}, Side: {Amount: {gt: "0"}, Currency: {MintAddress: {in: $quoteTokenAddresses}}}, PriceInUSD: {gt: 0}}, Transaction: {Result: {Success: true}}}
      limit: {count: $limit}
    ) {
      Block {
        timestamp: Time(interval: {count: $intervalCount, in: $timeInterval})
      }
      volume: sum(of: Trade_Side_AmountInUSD)
      high: quantile(of: Trade_PriceInUSD, level: 0.95)
      low: quantile(of: Trade_PriceInUSD, level: 0.05)
      Trade {
        close: PriceInUSD(maximum: Block_Slot)
        closeNative: Price(maximum: Block_Slot)
        open: PriceInUSD(minimum: Block_Slot)
      }
    }
  }
}

Variables

{
  "after": "2025-08-19T09:16:13.510225708Z",
  "intervalCount": 1,
  "limit": 60,
  "quoteTokenAddresses": [
    "So11111111111111111111111111111111111111112"
  ],
  "timeInterval": "minutes",
  "tokenAddress": "Eyc4ozMWwUxBUTK61MTjzLBjSWWWNqqc8sjTF3Gfbonk"
}

Similar queries