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

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.

1 Like

Use “time”, instead of “date” filter

{
  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
      }
    }
  }
}

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