top pairs

Returns 100 DEX trades by token on Solana, where block time after 2025-12-16, sorted by USD, highest first: block time, currency symbol, currency name, currency mint address, side currency symbol, side currency name, side currency mint address and 6 more fields.

By Nadia · saved 17 December 2025 · run 11 times · Bitquery API v2

What it returns

Filters

The query

query ($time_10min_ago: DateTime!, $time_1h_ago: DateTime!, $time_3h_ago: DateTime!, $time_ago: DateTime!, $wsol: String!, $usdc: String!, $usdt: String!) {
  Solana {
    DEXTradeByTokens(
      where: {Transaction: {Result: {Success: true}}, Block: {Time: {after: $time_ago}}, any: [{Trade: {Currency: {MintAddress: {notIn: [$usdc, $usdt]}}, Side: {Currency: {MintAddress: {is: $wsol}}}}}, {Trade: {Currency: {MintAddress: {not: $usdc}}, Side: {Currency: {MintAddress: {is: $usdt}}}}}, {Trade: {Side: {Currency: {MintAddress: {is: $usdc}}}}}, {Trade: {Currency: {MintAddress: {notIn: [$wsol, $usdc, $usdt]}}, Side: {Currency: {MintAddress: {notIn: [$wsol, $usdc, $usdt]}}}}}]}
      orderBy: {descendingByField: "usd"}
      limit: {count: 100}
    ) {
      Block {
        Time(maximum: Block_Time, selectWhere: {after: $time_1h_ago})
      }
      Trade {
        Currency {
          Symbol
          Name
          MintAddress
        }
        Side {
          Currency {
            Symbol
            Name
            MintAddress
          }
        }
        price_last: PriceInUSD(maximum: Block_Slot)
        price_10min_ago: PriceInUSD(
          minimum: Block_Slot
          if: {Block: {Time: {after: $time_10min_ago}}}
        )
        price_1h_ago: PriceInUSD(
          minimum: Block_Slot
          if: {Block: {Time: {after: $time_1h_ago}}}
        )
        price_3h_ago: PriceInUSD(
          minimum: Block_Slot
          if: {Block: {Time: {after: $time_3h_ago}}}
        )
      }
      dexes: uniq(of: Trade_Dex_ProgramAddress)
      amount: sum(of: Trade_Side_Amount)
      usd: sum(of: Trade_Side_AmountInUSD)
      traders: uniq(of: Trade_Account_Owner)
      count(selectWhere: {ge: "100"})
    }
  }
}

Variables

{
  "usdc": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "usdt": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
  "wsol": "So11111111111111111111111111111111111111112",
  "min_count": "1",
  "time_1h_ago": "2025-12-17T11:29:52Z",
  "time_3h_ago": "2025-12-17T09:29:52Z",
  "time_10min_ago": "2025-12-17T12:19:52Z",
  "time_ago": "2025-12-16T12:29:52Z"
}

Similar queries