# DEX prices for multiple contracts - can it be batched?

**URL:** <https://community.bitquery.io/t/dex-prices-for-multiple-contracts-can-it-be-batched/77>\
**Category:** GraphQL API\
**Tags:** closed\
**Created:** [May 26, 2021, 9:05am UTC](https://community.bitquery.io/t/dex-prices-for-multiple-contracts-can-it-be-batched/77 "2021-05-26T09:05:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vitamingum](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@vitamingum](https://community.bitquery.io/u/vitamingum)\
**Post date:** [May 26, 2021, 9:05am UTC](https://community.bitquery.io/t/dex-prices-for-multiple-contracts-can-it-be-batched/77/1 "2021-05-26T09:05:41Z")

</div>

I’m trying to get the last few DEX transaction for ~40 different contracts. from what I can tell that’s 40 API calls.

is there some way to batch them together?

right now I’m using 40 calls to this node:  
ethereum(network: $network){  
dexTrades(options: { desc: [“block.height”, “tradeIndex”], limit: $limit, offset: $offset },  
date: { since: $from till: $till }  
baseCurrency: { is: $token }

and getting throttled

---

<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:** [May 26, 2021, 9:37am UTC](https://community.bitquery.io/t/dex-prices-for-multiple-contracts-can-it-be-batched/77/2 "2021-05-26T09:37:41Z")

</div>

Add more base currencies like below

baseCurrency: { in: [“token1”, “token2”]}

---

<div class="post-metadata">

**Author:** ![vitamingum](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@vitamingum](https://community.bitquery.io/u/vitamingum)\
**Post date:** [May 26, 2021, 11:21am UTC](https://community.bitquery.io/t/dex-prices-for-multiple-contracts-can-it-be-batched/77/3 "2021-05-26T11:21:01Z")

</div>

less popular tokens are not showing up in the results at all. is there a way to return an equal number of results for each token?

---

<div class="post-metadata">

**Author:** ![vitamingum](https://avatars.discourse-cdn.com/v4/letter/v/2acd7d/32.png) [@vitamingum](https://community.bitquery.io/u/vitamingum)\
**Post date:** [May 26, 2021, 12:07pm UTC](https://community.bitquery.io/t/dex-prices-for-multiple-contracts-can-it-be-batched/77/4 "2021-05-26T12:07:18Z")

</div>

found the answer 🙂

limitBy: {each: “baseCurrency.address”, limit: 1}

bitquery is awesome!!!
