get buy, sell stats for tokens on pumpfun

Returns 200 DEX trades by token on Solana, where currency mint address is 6amZ7b…pump or 2gVCFA…pump, DEX protocol name is pump and block time since 2025-02-04, sorted by trade last price maximum, highest first: market address, currency symbol, currency name, currency mint address, URI, trade price, count and 2 more fields.

By Divyasshree · saved 4 February 2025 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query ($from: DateTime) {
  Solana(network: solana, dataset: realtime) {
    DEXTradeByTokens(
      limit: {count: 200}
      orderBy: {descendingByField: "Trade_lastPrice_maximum"}
      where: {Block: {Time: {since: $from}}, Trade: {Currency: {Native: false, MintAddress: {in: ["6amZ7bifBCRsDmBK1ixsVGb13E2m9pMy83pWUJSPpump", "2gVCFA6RNobmcH4PSRWko9zjaxDK7ommyySrPWCppump"]}}, Dex: {ProtocolName: {is: "pump"}}}, Transaction: {Result: {Success: true}}}
    ) {
      Trade {
        Market {
          MarketAddress
        }
        Currency {
          Symbol
          Name
          MintAddress
          Uri
        }
        lastPrice: Price(maximum: Block_Slot)
        prePrice: Price(minimum: Block_Slot)
      }
      count
      traders: uniq(of: Trade_Account_Owner)
      buy_usd: sum(of: Trade_Side_AmountInUSD, if: {Trade: {Side: {Type: {is: buy}}}})
      sell_usd: sum(
        of: Trade_Side_AmountInUSD
        if: {Trade: {Side: {Type: {is: sell}}}}
      )
    }
  }
}

Variables

{
  "from": "2025-02-04T00:00:00Z"
}

Similar queries