OHLC for a YAWN same time in archive with stats

Returns one DEX trade by token on Solana, where currency mint address is G49ck2…pump, side currency mint address is So1111…1112 and DEX protocol name is pump_amm, sorted by block timefield: block time, sum of trade amount, trade price, count and sum of trade side amount in USD.

By Divyasshree · saved 15 August 2025 · run 1 time · Bitquery API v2

What it returns

Filters

The query

{
  Solana(dataset: archive) {
    DEXTradeByTokens(
      limit: {count: 1}
      orderBy: {ascendingByField: "Block_Timefield"}
      where: {Trade: {Currency: {MintAddress: {is: "G49ck2CFHpXnbkswkQoUpL1dBm1XFZcTj8A6W6Ampump"}}, PriceAsymmetry: {lt: 0.1}, Dex: {ProtocolName: {is: "pump_amm"}}, Side: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}}}, Block: {Time: {since: "2025-08-13T23:36:00Z"}}}
    ) {
      Block {
        Timefield: Time(interval: {in: minutes, count: 1})
      }
      volume: sum(of: Trade_Amount)
      Trade {
        high: Price(maximum: Trade_Price)
        low: Price(minimum: Trade_Price)
        open: Price(minimum: Block_Slot)
        close: Price(maximum: Block_Slot)
      }
      total_trades: count
      total_traded_volume: sum(of: Trade_Side_AmountInUSD)
      total_buy_volume: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: buy}}}}
      )
      total_sell_volume: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
      total_buys: count(if: {Trade: {Side: {Type: {is: buy}}}})
      total_sells: count(if: {Trade: {Side: {Type: {is: sell}}}})
      count
    }
  }
}

Similar queries