test-trade-query

Returns the latest DEX trades by token on Solana, where account owner is CPoNdo…DuB6 and currency mint address is A2F3w8…CNDL: account owner, currency symbol, side type, block time, sum of trade amount, sum of trade amount in USD and sum of trade side amount in USD.

By alex · saved 27 May 2025 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query ($wallets: [String!]!, $token: String!) {
      Solana(dataset: combined) {
        trades: DEXTradeByTokens(
          where: {
            Trade: {
              Account: {Owner: {in: $wallets}},
              Currency: {MintAddress: {is: $token}}
            }
          }
          orderBy: {descendingByField: "Block_Time"}
        ) {
          Trade { Account { Owner } Currency { Symbol } Side { Type } }
          Block { Time }
          tokens: sum(of: Trade_Amount)
          tokensInUSD: sum(of: Trade_AmountInUSD)
          tokens2InUSD: sum(of: Trade_Side_AmountInUSD)
        }
      }
    }

Variables

{
    "token": "A2F3w8mig8eLUDMbQm4kecpDZUfuvh2GfAEg1dmjCNDL",
    "wallets": ["CPoNdo425rb883HcDKJJhzu5aeQmBqzhto755JqjDuB6"]
  }

Similar queries