How to ignore MEV bots when getting quotePrice(calculate: maximum)?

I am trying to estimate ATH of a given token.

  ethereum(network: bsc) {
      date: {since: "2023-01-01"}
      exchangeName: {in: ["Pancake", "Pancake v2"]}
      baseCurrency: {is: "0xcf3a0a2392698fac191f7a7dd031773caffd3456"}
      quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
    ) {
      maximum_price: quotePrice(calculate: maximum)

This works well, except for 0 tax tokens which MEV bots take advantage of. Because MEV bots make huge purchases (multiple thousand dollars) and sales, their purchases will always be the biggest quotePrice, and the result of the above code will be inaccurately high. Since they aren’t real traders and they just buy and sell within the same block to steal funds from another buyer, they should be ignored when estimating ATH. Is there a way to filter out these MEV bot transactions?

Here is an example, go to buyers and sellers section of this chart: PooCoin BSC Charts

You will see that a bot spent $13,416 on a token to get back $13,472 within the same block. I am trying to ignore these transactions.

To filter out MEV bots, you can do a few things

  • filtering by the upper side of the quote price and
  • setting a maximum filter on volume
  • set a txSize limit