Issues with data

If you run the query below then buyAmount and sellAmount look quite normal at first but then when it gets to about 9:00 the figures go up by a lot They’re like 2 quadrillion times bigger. The numbers are around 1,500,000 and they go to 3,488,121,484,375,000,000,000. They mix between big ones and small ones for a while before they gradually become mostly the big ones. I’m using the v1 API, will this be the same in v2?

{
ethereum(network: ethereum) {
dexTrades(
date: {is: “2024-02-06”}
options: {asc: “timeInterval.minute”}
exchangeName: {in: [“Uniswap”]}
) {
sellAmount(in: USD)
buyAmount(in: USD)
timeInterval {
minute(count: 2)
}
exchange {
name
fullName
}
tradeAmount(in: USD)
}
}
}

I know nobody’s replied to my original question but I’ve been working on trying to duplicate this in V2, but I’m struggling to understand it.

  1. How do I query between two dates/times? I can see “since”, “till”, etc, but they seem to be using the OR condition and pulling way too much data.

  2. There seems to be two places to filter by date/time, what’s the difference?
    EVM > DEXTrades > where > any > Block > Time
    and
    EVM > DEXTrades > Block > Time
    Which should I use?

Wrt amount, does it not depend on the token that’s being bought/sold? Could be random tokens. But values like 3,488,121,484,375,000,000,000 look odd. Can you create a ticket at support.bitquery.io ?

@twinnie since/till does not use OR condition. if you use both, then they are applied.
Any is OR condition. Filtering | Blockchain Data API (V2)

Block → time is much more granular since it filters between timestamp A& B.
But Block-> date filters between two dates A&B

  1. To query between two dates/times, you can use the since and till which does consume slightly more points. Additionally you can try to use the filter of after and before to check. It does use slightly lesser points.
  2. You should ideally use EVM > DEXTrades > Block > Time since the any function is a way to have or conditions added. So if you filter through Or without any additional arguement, then you would still get the data with the date filtered out. But it would cost more since its an OR function that would be taking place

Thanks, I’ll open a ticket about the data thing. It’s supposed to be returning the results in USD and it’s showing like two sextillion dollars of volume in two minutes so there must be something wrong. I’ve been using that query for months and it’s always seemed fine.

Those details on the results are helpful, I’ll take another look. I didn’t look too far into the results I was getting but it was showing the first result coming in from 2017 but if you say it’s not supposed to be doing that I’ll double check what I’m doing.

Thanks.