# How to include Transaction Hash and User address with trades count

**URL:** <https://community.bitquery.io/t/how-to-include-transaction-hash-and-user-address-with-trades-count/685>\
**Category:** GraphQL API\
**Tags:** tradingview, graphql-ide\
**Created:** [November 29, 2021, 12:53pm UTC](https://community.bitquery.io/t/how-to-include-transaction-hash-and-user-address-with-trades-count/685 "2021-11-29T12:53:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ph-hitachi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.bitquery.io/ph-hitachi/32/318_2.png) [@Ph-hitachi](https://community.bitquery.io/u/Ph-hitachi)\
**Post date:** [November 29, 2021, 12:53pm UTC](https://community.bitquery.io/t/how-to-include-transaction-hash-and-user-address-with-trades-count/685/1 "2021-11-29T12:53:28Z")

</div>

Hi, im having problem when i will include the transaction hash on my query…

here’s my query

```auto
{
  ethereum(network: bsc) {
    dexTrades(
      options: {asc: "timeInterval.minute"}
      date: {since: "2021-06-20T07:23:21.000Z", till: "2021-06-23T15:23:21.000Z"}
      exchangeAddress: {is: "0xcA143Ce32Fe78f1f7019d7d551a6402fC5350c73"}
      baseCurrency: {is: "0x2170ed0880ac9a755fd29b2688956bd959f933f8"}
      quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
      tradeAmountUsd: {gt: 10}
    ) {
      timeInterval {
        minute(count: 15, format: "%Y-%m-%dT%H:%M:%SZ")
      }
      volume: quoteAmount(in: USD)
      high: quotePrice(calculate: maximum)
      low: quotePrice(calculate: minimum)
      open: minimum(of: block, get: quote_price)
      close: maximum(of: block, get: quote_price)
      baseAmount(in: USD)
      baseCurrency {
        address
        name
        symbol
      }
      quoteCurrency {
        address
        symbol
      }
      transaction {
        hash
        txFrom {
          address
        }
      }
    }
  }
}

```

 ![Capture](https://us1.discourse-cdn.com/flex016/uploads/bitquery/original/1X/6cf84e4e0f355a935bcfc9ac8b86f569ff6fb388.jpeg)

it’s looks normal but when i add

```auto
transaction {
        hash
        txFrom {
              address
        }
}

```

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

The OHCL will showing not correct data, its shows same value

---

<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 29, 2021, 1:02pm UTC](https://community.bitquery.io/t/how-to-include-transaction-hash-and-user-address-with-trades-count/685/2 "2021-11-29T13:02:11Z")

</div>

OHLC query aggregates data based on time interval.

However, when you add below it basically aggregates based on the transaction, not the time interval.

```auto
transaction {
        hash
        txFrom {
              address
        }
}

```

---

<div class="post-metadata">

**Author:** ![Ph-hitachi](https://sea2.discourse-cdn.com/flex016/user_avatar/community.bitquery.io/ph-hitachi/32/318_2.png) [@Ph-hitachi](https://community.bitquery.io/u/Ph-hitachi)\
**Post date:** [November 29, 2021, 1:18pm UTC](https://community.bitquery.io/t/how-to-include-transaction-hash-and-user-address-with-trades-count/685/3 "2021-11-29T13:18:00Z")

</div>

> [@gaurav](#):
>
> However, when you add below it basically aggregates based on the transaction, not the time interval.
> 
> ```auto
> 
> ```

ok thanks, but this will affect the candle bars data? if yes, how can i filter it to base on time interval?

or should i use different query for candle bars and getting transaction?

---

<div class="post-metadata">

**Author:** ![aman](https://avatars.discourse-cdn.com/v4/letter/a/90ced4/32.png) [@aman](https://community.bitquery.io/u/aman)\
**Post date:** [November 30, 2021, 10:47am UTC](https://community.bitquery.io/t/how-to-include-transaction-hash-and-user-address-with-trades-count/685/4 "2021-11-30T10:47:38Z")

</div>

you could use options and use parameters such as since till. For candle here is the sample query:

> **[tv weth saitama](https://graphql.bitquery.io/ide/tv-weth-saitama)**
>
> trading view chart
