Pancake OHLC query wBNB/BUSD problem

Hi,
Hi team i am using Pancake OHLC query wBNB/BUSD, but minimum_price value is too low and not same as poocoin chart.

{
  ethereum(network: bsc) {
    dexTrades(
      options: {limit: 100, asc: "timeInterval.hour"}
      time: {since: "2022-04-12T08:00:00Z", till: "2022-04-12T09:00:00Z"}
      exchangeName: {is: "Pancake v2"}
      baseCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
      quoteCurrency: {is: "0xe9e7cea3dedca5984780bafc599bd69add087d56"}
    ) {
      timeInterval {
        hour(count: 1)
      }
      baseCurrency {
        symbol
        address
      }
      baseAmount
      quoteCurrency {
        symbol
        address
      }
      quoteAmount
      trades: count
      quotePrice
      maximum_price: quotePrice(calculate: maximum)
      minimum_price: quotePrice(calculate: minimum)
      median_price: quotePrice(calculate: median)
      open_price: minimum(of: block, get: quote_price)
      close_price: maximum(of: block, get: quote_price)
    }
  }
}

Here is the result

{
  "ethereum": {
    "dexTrades": [
      {
        "timeInterval": {
          "hour": "2022-04-12 08:00:00"
        },
        "baseCurrency": {
          "symbol": "WBNB",
          "address": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"
        },
        "baseAmount": 4726.237471631324,
        "quoteCurrency": {
          "symbol": "BUSD",
          "address": "0xe9e7cea3dedca5984780bafc599bd69add087d56"
        },
        "quoteAmount": 1926802.435557004,
        "trades": 3743,
        "quotePrice": 407.68210381353146,
        "maximum_price": 409.41163211695823,
        "minimum_price": 202.92263571706536,
        "median_price": 407.88000362531847,
        "open_price": "408.12729037280536",
        "close_price": "408.77829260320027"
      }
    ]
  }
}

"minimum_price": 202.92263571706536,

Poocoin chart PooCoin BSC Charts

How can i query same as Poocoin?

Everyone has a different method of ohlc, poocoin has their own mechanism. We provide them with the data, we are not sure about their technological workings. If you think there is a problem with the data, you can match that with the transaction hash to check if there is appropriate data.

1 Like

Ok, After investigation, there is a transaction at 8.32 … which has 4 trades

https://bscscan.com/tx/0x86151ecce8356e0ff61dd9063d772a051b16c308cec29b3f4eaf8fb4e43485ca

Here if you see in 1 swap… you can see the base and quote amount… because of it the price came 202.92263571706536

I don’t think there is way to remove this transaction using any filter for now. other then hardcoding the transaction itself… but data is correct

1 Like

i have added
priceAsymmetry: {lteq: 0.1}

then wBNB/BUSD data will be same as poocoin
but 0.1 is not correct with every other tokens, how can i choose this value