2. Rob Test - Buy/Sell Ratio

Analyzes the buy/sell ratio for a batch of candidate tokens identified in 'Rob Test - Active Tokens'. Filters to the same 3-day window and $10 minimum trade size. For each token, returns the number of buy-side trades, sell-side trades, and total volume in USD. Used to detect wash trading patterns where tokens show a suspiciously balanced 1:1 buy/sell ratio, indicating the same entities are cycling trades back and forth rather than organic market activity.

By Robert · saved 1 February 2026 · run 8 times · Bitquery API v2

What it returns

Filters

The query

# Query 2: Buy/sell ratio for candidate tokens
# Replace the in array with MintAddresses from Query 1
query BuySellRatio {
  Solana {
    DEXTrades(
      where: {
        Block: {
          Time: {
            after: "2026-01-29T00:00:00Z"
          }
        }
        Trade: {
          Buy: {
            Currency: {
              MintAddress: {
                in: [
                  "8Jx8AAHj86wbQgUTjGuj6GTTL5Ps3cqxKRTvpaJApump"
                  "MINT_ADDRESS_2"
                  "MINT_ADDRESS_3"
                ]
              }
            }
            AmountInUSD: {
              ge: "10"
            }
          }
        }
      }
    ) {
      Trade {
        Buy {
          Currency {
            MintAddress
          }
        }
      }
      buy_trades: count(
        distinct: Transaction_Signature
        if: { Trade: { Buy: { AmountInUSD: { ge: "0" } } } }
      )
      sell_trades: count(
        distinct: Transaction_Signature
        if: { Trade: { Sell: { AmountInUSD: { ge: "0" } } } }
      )
      total_volume: sum(of: Trade_Buy_AmountInUSD)
    }
  }
}

Similar queries