myown

Returns DEX trades by token and rewards on Solana, where currency mint address is H8H2fM…pump, block time after 2024-12-25 and trade amount is above 0, sorted by block time: block time, quantile of trade price in USD, median of trade price in USD, sum of trade side amount in USD and unique of reward amount.

By Lisa Wall · saved 26 December 2024 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query pumpFunTradesSolToken($token: String, $dataset: dataset_arg_enum, $interval: Int, $time_ago: DateTime) {
  Solana(dataset: $dataset) {
    DEXTradeByTokens(
      orderBy: {ascendingByField: "Block_Time"}
      where: {Trade: {Amount: {gt: "0"}, Currency: {MintAddress: {is: $token}}}, Transaction: {Result: {Success: true}}, Block: {Time: {after: $time_ago}}}
    ) {
      Block {
        Time(interval: {count: $interval, in: minutes})
      }
      min: quantile(of: Trade_PriceInUSD, level: 0.05)
      max: quantile(of: Trade_PriceInUSD, level: 0.95)
      close: median(of: Trade_PriceInUSD)
      open: median(of: Trade_PriceInUSD)
      volume: sum(of: Trade_Side_AmountInUSD)
    }
    Rewards {
      uniq(of: Reward_Amount, selectWhere: {lt: "", ne: ""})
    }
  }
}

Variables

{
  "token": "H8H2fMBWSxEDNM7dYWrSJEv6FbsR8AqonEueKHEopump",
  "time_ago": "2024-12-25T21:57:29Z",
  "interval": 5,
  "dataset": "realtime"
}

Similar queries