# Get the correct information OHLC

**URL:** <https://community.bitquery.io/t/get-the-correct-information-ohlc/679>\
**Category:** GraphQL API\
**Tags:** support\
**Created:** [November 28, 2021, 9:35am UTC](https://community.bitquery.io/t/get-the-correct-information-ohlc/679 "2021-11-28T09:35:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zerox](https://avatars.discourse-cdn.com/v4/letter/z/e480ec/32.png) [@zerox](https://community.bitquery.io/u/zerox)\
**Post date:** [November 28, 2021, 9:35am UTC](https://community.bitquery.io/t/get-the-correct-information-ohlc/679/1 "2021-11-28T09:35:21Z")

</div>

Hello community, I am using your services to obtain candles to use in the tradingview library.

I am currently accessing data on sushiswap from two example OHM / DAI pairs.

The query is as follows

```auto
{
  ethereum(network: ethereum) {
    dexTrades(
      options: {asc: "timeInterval.minute"}
      date: {since: "2021-03-07T18:20:21.000Z", till: "2021-11-27T18:20:21.000Z"}
      exchangeAddress: {is: "0xc0aee478e3658e2610c5f7a4a2e1777ce9e4f2ac"}
      baseCurrency: {is: "0x6b175474e89094c44da98b954eedeac495271d0f"}
      quoteCurrency: {is: "0x383518188C0C6d7730D91b2c03a03C837814a899"}
      tradeAmountUsd: {gt: 20}
    ) {
      timeInterval {
        minute(format: "%FT%TZ", count: 10)
      }
      baseAmount
      volume: quoteAmount
      high: quotePrice(calculate: maximum)
      low: quotePrice(calculate: minimum)
      open: minimum(of: block, get: quote_price)
      close: maximum(of: block, get: quote_price)
      baseCurrency {
        name
      }
    }
  }
}

```

The answer comes, but the data in Open, High, Low, Close is wrong

 ![tes](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/517fbcc2c52a4f73ad7c0028815ed33d43ee2a51.png)

It should come this way

```auto
{
time: 1632959760000,
open: 721.5355829329836,
high: 721.8087027744336,
low: 721.5355829329836,
close: 721.8087027744336,
volume: 18949.105844776514
},
{
time: 1632959820000,
open: 717.5193664229853,
high: 717.5193664229853,
low: 717.5193664229853,
close: 717.5193664229853,
volume: 1742.1370216750083
},
{
time: 1632960000000,
open: 722.7703622487928,
high: 722.7703622487928,
low: 722.7703622487928,
close: 722.7703622487928,
volume: 99999.99999999999
}

```

I appreciate your help, surely I need to convert the data?

---

<div class="post-metadata">

**Author:** ![gaurav](https://avatars.discourse-cdn.com/v4/letter/g/b487fb/32.png) [@gaurav](https://community.bitquery.io/u/gaurav)\
**Post date:** [November 28, 2021, 9:42am UTC](https://community.bitquery.io/t/get-the-correct-information-ohlc/679/2 "2021-11-28T09:42:18Z")

</div>

You need flip base and quote currency.

Also need to change the sorting from asc from desc.

> **[OHM / DAI pairs](https://graphql.bitquery.io/ide/OHM--DAI-pairs)**
>
> OHM / DAI pairs
