Svg

Returns 20 DEX trades by token on Solana, where currency mint address is not So1111…1112 or EPjFWd…Dt1v, DEX protocol name is pump and block time after 2025-09-07, sorted by buy, highest first: currency symbol, currency name, currency mint address, price in USD, block time and sum of trade side amount in USD.

By Suehil Garza · saved 8 September 2025 · Bitquery API v2

What it returns

Filters

The query

query ($dexmarket: String, $time_ago: DateTime, $time_1h_ago: DateTime) {
  Solana(dataset: realtime) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "buy"}
      where: {Trade: {Currency: {MintAddress: {notIn: ["So11111111111111111111111111111111111111112", "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"]}}, Dex: {ProtocolName: {is: $dexmarket}}}, Transaction: {Result: {Success: true}}, Block: {Time: {after: $time_ago}}}
      limit: {count: 20}
    ) {
      Trade {
        Currency {
          Symbol
          Name
          MintAddress
        }
        price_last: PriceInUSD(maximum: Block_Slot)
        price_1h_ago: PriceInUSD(
          minimum: Block_Slot
          if: {Block: {Time: {after: $time_1h_ago}}}
        )
      }
      Block {
        Time(maximum: Block_Time, selectWhere: {after: $time_1h_ago})
      }
      usd: sum(of: Trade_Side_AmountInUSD)
      buy: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: buy}}}})
    }
  }
}

Variables

{
  "dexmarket": "pump",
  "network": "solana",
  "time_1h_ago": "2025-09-08T12:56:09Z",
  "time_ago": "2025-09-07T13:56:09Z"
}

Similar queries