# Error: Quote Prices for Tokens on BSC

**URL:** <https://community.bitquery.io/t/error-quote-prices-for-tokens-on-bsc/421>\
**Category:** GraphQL API\
**Tags:** dex, closed\
**Created:** [August 18, 2021, 7:10pm UTC](https://community.bitquery.io/t/error-quote-prices-for-tokens-on-bsc/421 "2021-08-18T19:10:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![peter\_performance](https://avatars.discourse-cdn.com/v4/letter/p/b4bc9f/32.png) [@peter\_performance](https://community.bitquery.io/u/peter_performance)\
**Post date:** [August 18, 2021, 7:10pm UTC](https://community.bitquery.io/t/error-quote-prices-for-tokens-on-bsc/421/1 "2021-08-18T19:10:18Z")

</div>

Hey everyone,  
I am running the following query to get the prices (median, high, low etc.) for a token on a single day against its trading pair. In the example below the base currency is Safemoon and the trading pair is WBNB.  
The stats for the median and mean quote prices seem fine, but the low price can simply not be true. There is definitely an error. I cross checked the Safemoon price for today (2021-08-18) on poocoin app and coinmarket cap.  
It has definitely never hit 7.083684002582547e-14 BNB.

**The query:**

query ($baseAddress: String, $quoteAddress: String, $from: ISO8601DateTime!, $to: ISO8601DateTime!, $interval: Int!) {  
ethereum(network: bsc) {  
dexTrades(  
baseCurrency: {is: $baseAddress}  
quoteCurrency: {is: $quoteAddress}  
date: {between: [$from, $to]}  
priceAsymmetry: {lt: 10.1}  
options: {desc: “timeInterval.day”}  
exchangeName: {in: [“Pancake”, “Pancake v2”]}  
) {  
timeInterval {  
day(count: $interval)  
}  
baseCurrency: baseCurrency {  
symbol  
address  
tokenId  
}  
baseAmount: baseAmount  
quoteCurrency: quoteCurrency {  
symbol  
address  
}  
volumeQuoteCurrency: quoteAmount  
trades: count  
high: quotePrice(calculate: maximum)  
low: quotePrice(calculate: minimum)  
median: quotePrice(calculate: median)  
mean: quotePrice(calculate: average)  
open: minimum(of: block, get: quote\_price)  
close: maximum(of: block, get: quote\_price)  
}  
}  
}

with params:  
{  
“from”: “2021-03-01”,  
“to”: “2021-08-18”,  
“interval”: 1,  
“baseAddress”: “0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3”,  
“quoteAddress”: “0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c”  
}

I also played around and added an additional filter using only the main LP Pools of Safemoon on pancake swap but still getting the same unreasonable figures.

What am I doing wrong? Any suggestions?

Best regards,  
Pete

 ![error_bitquery_safemoon_dex_trades](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/9940e9b6129aa21578347002ed6bcd0bbd1ecd4b.jpeg)

---

<div class="post-metadata">

**Author:** ![peter\_performance](https://avatars.discourse-cdn.com/v4/letter/p/b4bc9f/32.png) [@peter\_performance](https://community.bitquery.io/u/peter_performance)\
**Post date:** [August 18, 2021, 7:23pm UTC](https://community.bitquery.io/t/error-quote-prices-for-tokens-on-bsc/421/2 "2021-08-18T19:23:25Z")

</div>

Ok, I think I just solved it. Not sure if this is the correct way to go, but if you add a filter regarding the tradeAmount in USD and set this above a reasonable threshold (say 100 USD) then this unreasonable low price quote vanishes. So, I presume these wrong numbers come from some minor & sketchy Liquidity Pools that somebody just opened.

---

<div class="post-metadata">

**Author:** ![sayon](https://avatars.discourse-cdn.com/v4/letter/s/b2d939/32.png) [@sayon](https://community.bitquery.io/u/sayon)\
**Post date:** [August 22, 2021, 7:15am UTC](https://community.bitquery.io/t/error-quote-prices-for-tokens-on-bsc/421/3 "2021-08-22T07:15:56Z")

</div>

Possibly that can be the case.
