Duplicate block

Returns the latest 1000 DEX trades by token on Solana, where currency mint address is ALQZVm…pump, side amount is above 0 and trade price in USD is above 0: block time, sum of trade side amount in USD, median of trade price in USD, median of trade price and price in USD.

By Sebastian · saved 9 March 2025 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query SolanaTokenPrice($tokenAddress: 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: {}}, PriceInUSD: {gt: 0}}, Transaction: {Result: {Success: true}}}
      limit: {count: $limit}
    ) {
      Block {
        timestamp: Time(interval: {count: $intervalCount, in: $timeInterval})
      }
      volume: sum(of: Trade_Side_AmountInUSD)
      close: median(of: Trade_PriceInUSD)
      closeNative: median(of: Trade_Price)
      Trade {
        high: PriceInUSD(maximum: Trade_PriceInUSD)
        low: PriceInUSD(minimum: Trade_PriceInUSD)
        open: PriceInUSD(minimum: Block_Slot)
      
      }
    }
  }
}

Variables

{
  "tokenAddress": "ALQZVm571QPmxBaeViWgQJuUEU4so9zd7Y22LboHpump",
  "timeInterval": "minutes",
  "intervalCount": 30,
  "limit": 1000
}

Similar queries