# Trying to retrive the max price of a token but I'm getting a really High Value

**URL:** https://community.bitquery.io/t/trying-to-retrive-the-max-price-of-a-token-but-im-getting-a-really-high-value/1357
**Category:** GraphQL API
**Created:** [January 25, 2023, 10:10am UTC](https://community.bitquery.io/t/trying-to-retrive-the-max-price-of-a-token-but-im-getting-a-really-high-value/1357 "2023-01-25T10:10:05Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![abcd](https://avatars.discourse-cdn.com/v4/letter/a/c57346/32.png) [@abcd](https://community.bitquery.io/u/abcd)
#### Post date: [January 25, 2023, 10:10am UTC](https://community.bitquery.io/t/trying-to-retrive-the-max-price-of-a-token-but-im-getting-a-really-high-value/1357/1 "2023-01-25T10:10:05Z")

</div>

Hi there! I’m trying to get the max price of, for instance, the Uniswap token.

The query I’m using is the following, trying to get the UNI/WETH pair.

```auto
{
  ethereum(network: ethereum) {
    dexTrades(
      baseCurrency: {is: "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"}
      quoteCurrency: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}
    ) {
      quotePrice(calculate: any)
    }
  }
}

```

Computing then the value with the current price of WETH would seems to give me the right price when I’m using “any”, but I get really high values when I select “maximum”.

Is there something I’m doing wrong?

---

<div class="post-metadata">

### Author: ![Divya](https://avatars.discourse-cdn.com/v4/letter/d/13edae/32.png) [@Divya](https://community.bitquery.io/u/Divya)
#### Post date: [January 25, 2023, 12:49pm UTC](https://community.bitquery.io/t/trying-to-retrive-the-max-price-of-a-token-but-im-getting-a-really-high-value/1357/2 "2023-01-25T12:49:38Z")

</div>

Include a **date criteria** (between, after, before, anything…) to get the correct result.  
Use **maximum(of: quote\_price, get: quote\_price)** to get max value.

See the below query for example

```auto
{
  ethereum(network: ethereum) {
    dexTrades(
      baseCurrency: {is: "0x1f9840a85d5af5bf1d1762f925bdaddc4201f984"}
      quoteCurrency: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}
      date: {after: "2023-01-24"}
     
    ) {
      maximum(of: quote_price, get: quote_price)
      date {
        date
      }
      quotePrice
      quoteCurrency {
        name
        symbol
      }
    }
  }
}

```
