topTrader

Returns 10 DEX trades by token on Solana, where side currency mint address is EPjFWd…Dt1v, currency mint address is 6p6xgH…GiPN and side type is sell, sorted by tokens, highest first: account owner, sum of trade amount and count.

By elec · saved 8 February 2025 · Bitquery API v2

What it returns

Filters

The query

query MyQuery($token: String, $base: String, $time_start: DateTime!, $time_end: DateTime!, $min_amount: String) {
  Solana(dataset: combined) {
    DEXTradeByTokens(
      limit: {count: 10}
      orderBy: {descendingByField: "tokens"}
      where: {Trade: {Side: {Amount: {gt: $min_amount}, Currency: {MintAddress: {is: $base}}, Type: {is: sell}}, Currency: {MintAddress: {is: $token}}, Price: {gt: 0}}, Transaction: {Result: {Success: true}}, Block: {Time: {since: $time_start, till: $time_end}}}
    ) {
      Trade {
        Account {
          Owner
        }
      }
      tokens: sum(of: Trade_Amount)
      trades: count
    }
  }
}

Variables

{
  "token": "6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN",
  "base": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
  "time_start":"2025-01-19T21:00:00Z",
  "time_end":"2025-01-19T21:30:00Z",
  "min_amount":"10000"
}

Similar queries