Hello
I am trying to build a dashboard that shows how a particular wallet interacts with multiple decentralized exchanges (DEXes) such as Uniswap, PancakeSwap & SushiSwap over time. The goal is to track which DEX the wallet used, how frequently & the volume transacted ideally grouped by week or month.
While I can write separate queries for each DEX & then merge results manually, I’m wondering if there’s a way to streamline this using a single GraphQL query by filtering on a list of DEX protocols and grouping the results.
I have explored the dexTrades
endpoint and can get individual trades, but I’m unsure how to dynamically group across protocols in one shot and aggregate them by time intervals. Checked DEX Trades API | Blockchain Data API (V2) UiPath Course guide related to this and found it quite informative.
Is there a best practice or pattern to follow for this kind of use case? Maybe using fragments, nested filtering, or subqueries within Bitquery’s syntax? Any help or query samples would be greatly appreciated!
Thank you !!