OHLC for a token on Pump Fun

Returns the latest 10 DEX trades by token on Solana, where currency mint address is 3bu7af…pump, DEX program address is 675kPX…1Mp8 and side type is buy: block time, sum of trade side amount in USD, price in USD and count.

By Ed · saved 5 November 2024 · run 3 times · Bitquery API v2

What it returns

Filters

The query

query {
  Solana {
    DEXTradeByTokens(
      limit: { count: 10 }
      orderBy: { descendingByField: "Block_Timefield" }
      where: {
        Trade: {
          Side: { Type: { is: buy } } # Filter to only include buy side trades
          Currency: {
            MintAddress: { is: "3bu7afk7Zq1iz1NSk3a3EGN8ucqEqHRpLhY7Dtejpump" }
          }
          Dex: {
            ProgramAddress: {
              is: "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"
            }
          }
        }
      }
    ) {
      Block {
        Timefield: Time(interval: { in: minutes, count: 1 })
      }
      volume: sum(of: Trade_Side_AmountInUSD)
      Trade {
        high: PriceInUSD(maximum: Trade_Price)
        low: PriceInUSD(minimum: Trade_Price)
        open: PriceInUSD(minimum: Block_Slot)
        close: PriceInUSD(maximum: Block_Slot)
      }
      count
    }
  }
}

Similar queries