# Get latest transactions and aggregate to get sell and buy amounts

**URL:** <https://community.bitquery.io/t/get-latest-transactions-and-aggregate-to-get-sell-and-buy-amounts/163>\
**Category:** GraphQL API\
**Tags:** closed\
**Created:** [June 12, 2021, 9:54am UTC](https://community.bitquery.io/t/get-latest-transactions-and-aggregate-to-get-sell-and-buy-amounts/163 "2021-06-12T09:54:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![CodeGod](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@CodeGod](https://community.bitquery.io/u/CodeGod)\
**Post date:** [June 13, 2021, 1:08pm UTC](https://community.bitquery.io/t/get-latest-transactions-and-aggregate-to-get-sell-and-buy-amounts/163/4 "2021-06-13T13:08:33Z")

</div>

I’m just thinking, we could use the candle data for this instead (like you proposed [here](https://community.bitquery.io/t/get-price-trading-volume-trade-count-of-all-tokens-in-a-single-api/106)), and look at the open and close for each token. This does not give the exact amounts but it does tell me whether there were more buys than sells. Although I’m not entirely sure what the exact query would have to look like, since:

- I don’t need _all_ tokens just those traded recently
- that query does not always seem to return the last candle

Basically, I’m trying to use the query to find tokens that are getting more buys than sells in the last X minutes

---

_[View the full topic](https://community.bitquery.io/t/get-latest-transactions-and-aggregate-to-get-sell-and-buy-amounts/163)._
