# Query for trade transactions not returning data as per the time specified only date being considered

**URL:** https://community.bitquery.io/t/query-for-trade-transactions-not-returning-data-as-per-the-time-specified-only-date-being-considered/198
**Category:** GraphQL API
**Tags:** closed, support
**Created:** [June 18, 2021, 3:38pm UTC](https://community.bitquery.io/t/query-for-trade-transactions-not-returning-data-as-per-the-time-specified-only-date-being-considered/198 "2021-06-18T15:38:03Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![csbit08](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@csbit08](https://community.bitquery.io/u/csbit08)
#### Post date: [June 18, 2021, 3:38pm UTC](https://community.bitquery.io/t/query-for-trade-transactions-not-returning-data-as-per-the-time-specified-only-date-being-considered/198/1 "2021-06-18T15:38:04Z")

</div>

I’m trying to get the trade transactions from a particular time but the query is returning transactions for the whole day, sort of ignoring the time part. I am using the below query:

{  
ethereum(network: bsc) {  
dexTrades(  
options: {asc: “block.timestamp.time”, limit: 1000, offset: 0}  
date: {since: “2021-06-16T16:00:04”, till: “2021-06-16T21:00:00”}  
baseCurrency: {is: “0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3”}  
) {  
block {  
timestamp {  
time(format: “%Y-%m-%d %H:%M:%S”)  
}  
height  
}  
tradeIndex  
protocol  
exchange {  
fullName  
}  
smartContract {  
address {  
address  
annotation  
}  
}  
baseAmount  
baseCurrency {  
address  
symbol  
}  
quoteAmount  
quoteCurrency {  
address  
symbol  
}  
transaction {  
hash  
}  
}  
}  
}

Its returning all transactions for 16/06/2021.

---

<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: [June 20, 2021, 8:21am UTC](https://community.bitquery.io/t/query-for-trade-transactions-not-returning-data-as-per-the-time-specified-only-date-being-considered/198/2 "2021-06-20T08:21:56Z")

</div>

Use “time”, instead of “date” filter

```auto
{
  ethereum(network: bsc) {
    dexTrades(
      options: {asc: "block.timestamp.time", limit: 1000, offset: 0}
      time: {since: "2021-06-16T16:00:04", till: "2021-06-16T21:00:00"}
      baseCurrency: {is: "0x8076c74c5e3f5852037f31ff0093eeb8c8add8d3"}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      protocol
      exchange {
        fullName
      }
      smartContract {
        address {
          address
          annotation
        }
      }
      baseAmount
      baseCurrency {
        address
        symbol
      }
      quoteAmount
      quoteCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
    }
  }
}

```

---

<div class="post-metadata">

### Author: ![csbit08](https://avatars.discourse-cdn.com/v4/letter/c/258eb7/32.png) [@csbit08](https://community.bitquery.io/u/csbit08)
#### Post date: [June 20, 2021, 11:10am UTC](https://community.bitquery.io/t/query-for-trade-transactions-not-returning-data-as-per-the-time-specified-only-date-being-considered/198/3 "2021-06-20T11:10:20Z")

</div>

Ok…that works. Thanks a a lot for pointing that out, I missed that part.

---

<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: [July 9, 2021, 7:00am UTC](https://community.bitquery.io/t/query-for-trade-transactions-not-returning-data-as-per-the-time-specified-only-date-being-considered/198/4 "2021-07-09T07:00:04Z")

</div>



---

<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: [July 30, 2021, 9:42am UTC](https://community.bitquery.io/t/query-for-trade-transactions-not-returning-data-as-per-the-time-specified-only-date-being-considered/198/5 "2021-07-30T09:42:37Z")

</div>


