any condition example

Returns 100 DEX trades by token on Solana, where side currency mint address is 6jTQCF…pump and block date since 2025-06-24, sorted by buy amount USD, highest first: sum of trade side amount, sum of trade amount in USD, count, account owner, account address, side currency symbol, side currency mint address and 3 more fields.

By Divyasshree · saved 16 July 2025 · run 4 times · Bitquery API v2

What it returns

Filters

The query

query ArchiveFrequentTokens {
  Solana(dataset: combined) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "buy_amount_usd"}
      limit: {count: 100}
      limitBy: {count: 1, by: Trade_Side_Currency_MintAddress}
      where: {Block: {Date: {since: "2025-06-24"}}, any: [{Trade: {Account: {Owner: {is: "GwyG5FQRNtY1faXYWdTLbcDNZTyW5d2Z63o1UiMUDQDT"}}, Side: {Type: {is: buy}}}}, {Trade: {Account: {Owner: {is: "GwyG5FQRNtY1faXYWdTLbcDNZTyW5d2Z63o1UiMUDQDT"}}, Side: {Type: {is: sell}}}}], Trade: {Side: {Currency: {MintAddress: {is: "6jTQCFZR8JwvvenVGa3RzGM3a5YEagk9kQXDpHHdpump"}}}}}
    ) {
      buy_amount: sum(of: Trade_Side_Amount, if: {Trade: {Side: {Type: {is: buy}}}})
      buy_amount_usd: sum(
        of: Trade_AmountInUSD
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      sell_amount: sum(of: Trade_Side_Amount, if: {Trade: {Side: {Type: {is: sell}}}})
      sell_amount_usd: sum(
        of: Trade_AmountInUSD
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      trade_count_buy: count(if: {Trade: {Side: {Type: {is: buy}}}})
      trade_count_sell: count(if: {Trade: {Side: {Type: {is: sell}}}})
      Trade {
        Account {
          Owner
          Address
        }
        Side {
          Currency {
            Symbol
            MintAddress
            Name
            Uri
          }
          Type
        }
      }
    }
  }
}

Similar queries