alpha

Returns 100 DEX trades by token on Solana, where currency mint address is bGxHNb…pump and block time after 2024-01-01, sorted by volume USD, highest first: account owner, side account address, side type, sum of trade amount, sum of trade side amount, sum of trade side amount in USD, count and fee payer.

By Alpha Spotter · saved 12 November 2024 · run 3 times · Bitquery API v2

What it returns

Filters

The query

query TopTraders($token: String, $time_ago: DateTime) {
  Solana {
    DEXTradeByTokens(
      orderBy: {descendingByField: "volumeUsd"}
      limit: {count: 100}
      where: {Trade: {Currency: {MintAddress: {is: $token}}}, Transaction: {Result: {Success: true}}, Block: {Time: {after: $time_ago}}}
    ) {
      Trade {
        Account {
          Owner
        }
        Side {
          Account {
            Address
          }
          Type
        }
      }
      bought: sum(
        of: Trade_Amount
        if: {Trade: {Side: {Type: {is: buy}, Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}}}
      )
      sold: sum(of: Trade_Amount, if: {Trade: {Side: {Type: {is: sell}}}})
      volume: sum(of: Trade_Side_Amount)
      volumeUsd: sum(of: Trade_Side_AmountInUSD)
      count(if: {Trade: {Side: {Type: {is: buy}}}})
      Transaction {
        FeePayer
      }
    }
  }
}

Variables

{
  "token": "bGxHNbsacaVL35pkYWae5PYQDZXSpuQb3QDyW31pump",
  "pool": "GzdVSyAjTfkUtMAXcqTWbPkH1RSQT8VKfGJwdg1f62U8",
  "time_ago": "2024-01-01T10:59:24Z"
}

Similar queries