pump fun token query

Returns DEX trades by token on Solana, where currency mint address is A9DrGc…pump and block time since 2024-09-24: currency name, currency mint address, currency symbol, price in USD, protocol name, protocol family, program address and 6 more fields.

By Matt · saved 18 November 2024 · run 38 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  Solana {
    DEXTradeByTokens(
      where: {
        Transaction: { Result: { Success: true } }
        Trade: {
          Currency: {
            MintAddress: { is: "A9DrGcfjwJgi3LbHdu1d7QVPcGfakTMgPxL3XUJ3pump" }
          }
        }
        Block: { Time: { since: "2024-09-24T08:03:00Z" } }
      }
    ) {
      Trade {
        Currency {
          Name
          MintAddress
          Symbol
        }
        start: PriceInUSD(minimum: Block_Time)
        min5: PriceInUSD(
          minimum: Block_Time
          if: { Block: { Time: { after: "2024-09-24T08:58:00Z" } } }
        )
        end: PriceInUSD(maximum: Block_Time)
        Dex {
          ProtocolName
          ProtocolFamily
          ProgramAddress
        }
        Market {
          MarketAddress
        }
        Side {
          Currency {
            Symbol
            Name
            MintAddress
          }
        }
      }
      makers: count(distinct: Transaction_Signer)
      makers_5min: count(
        distinct: Transaction_Signer
        if: { Block: { Time: { after: "2024-09-24T08:58:00Z" } } }
      )
      buyers: count(
        distinct: Transaction_Signer
        if: { Trade: { Side: { Type: { is: buy } } } }
      )
      buyers_5min: count(
        distinct: Transaction_Signer
        if: {
          Trade: { Side: { Type: { is: buy } } }
          Block: { Time: { after: "2024-09-24T08:58:00Z" } }
        }
      )
      sellers: count(
        distinct: Transaction_Signer
        if: { Trade: { Side: { Type: { is: sell } } } }
      )
      sellers_5min: count(
        distinct: Transaction_Signer
        if: {
          Trade: { Side: { Type: { is: sell } } }
          Block: { Time: { after: "2024-09-24T08:58:00Z" } }
        }
      )
      trades: count
      trades_5min: count(
        if: { Block: { Time: { after: "2024-09-24T08:58:00Z" } } }
      )
      traded_volume: sum(of: Trade_Side_AmountInUSD)
      traded_volume_5min: sum(
        of: Trade_Side_AmountInUSD
        if: { Block: { Time: { after: "2024-09-24T08:58:00Z" } } }
      )
      buy_volume: sum(
        of: Trade_Side_AmountInUSD
        if: { Trade: { Side: { Type: { is: buy } } } }
      )
      buy_volume_5min: sum(
        of: Trade_Side_AmountInUSD
        if: {
          Trade: { Side: { Type: { is: buy } } }
          Block: { Time: { after: "2024-09-24T08:58:00Z" } }
        }
      )
      sell_volume: sum(
        of: Trade_Side_AmountInUSD
        if: { Trade: { Side: { Type: { is: sell } } } }
      )
      sell_volume_5min: sum(
        of: Trade_Side_AmountInUSD
        if: {
          Trade: { Side: { Type: { is: sell } } }
          Block: { Time: { after: "2024-09-24T08:58:00Z" } }
        }
      )
      buys: count(if: { Trade: { Side: { Type: { is: buy } } } })
      buys_5min: count(
        if: {
          Trade: { Side: { Type: { is: buy } } }
          Block: { Time: { after: "2024-09-24T08:58:00Z" } }
        }
      )
      sells: count(if: { Trade: { Side: { Type: { is: sell } } } })
      sells_5min: count(
        if: {
          Trade: { Side: { Type: { is: sell } } }
          Block: { Time: { after: "2024-09-24T08:58:00Z" } }
        }
      )
    }
  }
}

Similar queries