The Scenario
A DeFi protocol's research team published their token list in Notion and someone pasted it into a Google Sheet — 10 ERC-20 contract addresses in column A. You've been asked to produce a table comparing total DEX buy volume, total sell volume, and average trade size for each token on Uniswap over the last 30 days.
The ask came in via a Slack message at 3 PM. The team's weekly synthesis doc goes out at 5 PM.
The bad version:
- Build a Bitquery GraphQL query using conditional metrics — side: {is: Buy} and side: {is: Sell} — run it for the first token, note the JSON response structure has buy and sell aggregations nested separately
- Run a second query for average trade size, discover it requires a different aggregation path and doesn't return cleanly alongside the buy/sell split
- Paste results for token 1 into the sheet, format them, realize the numbers are in the wrong units because Bitquery returns raw token amounts not USD-equivalent for average trade size, go back to the docs
Ten tokens, two or three query variants each, a response format you're still figuring out. The synthesis doc won't wait.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Google Sheet. It reads your token list, constructs the right Bitquery conditional metric queries, and writes aggregated buy/sell/average-size data directly into the sheet — no query iteration, no unit conversion by hand.
Open the SheetXAI sidebar and paste this prompt:
For each token contract in column A, query Bitquery for total buy volume, total sell volume, and average trade size on Uniswap in the last 30 days. Write the three metrics into columns B, C, and D.
What You Get
- Column B: total USD buy volume over 30 days, numeric
- Column C: total USD sell volume over 30 days, numeric
- Column D: average trade size in USD, numeric
- One row per token address — clean, flat, ready for downstream formulas
- Tokens with zero qualifying trades receive zeros rather than blanks
What If the Data Is Not Quite Ready
You want net buy/sell pressure (buy volume minus sell volume) as a fourth column
For each token in column A, query Bitquery for total buy volume, total sell volume, and average trade size on Uniswap in the last 30 days. Write results into columns B–D. Calculate net pressure (buy minus sell) into column E.
You only want tokens where total volume exceeds $1,000,000 — filter before writing
For each token in column A, query Bitquery for total buy and sell volume on Uniswap in the last 30 days. Write only tokens where combined volume exceeds $1,000,000 into a new sheet called "High Volume" with contract address, buy volume, sell volume, and average trade size.
Token addresses in column A map to human-readable names in column B and you want to include names in the output
For each token in column A (with name in column B), query Bitquery for total buy volume, total sell volume, and average trade size on Uniswap in the last 30 days. Write token name, buy volume, sell volume, and average trade size into columns A–D of sheet "Summary".
You want to clean the contract list, compute buy/sell ratio, flag heavily one-sided tokens, and pull everything in one shot
For each contract in column A, trim whitespace and validate address format. Query Bitquery for total buy volume, sell volume, and average trade size on Uniswap over 30 days. Write buy volume, sell volume, average trade size, and buy/sell ratio into columns B–E. Flag tokens where the buy/sell ratio exceeds 3:1 or falls below 1:3 in column F.
The pattern: validation, computation, and flagging fold into the same prompt as the data pull.
Try It
Get the 7-day free trial of SheetXAI and open a Google Sheet with your ERC-20 token contract addresses in column A, then ask SheetXAI to build a Uniswap buy vs. sell summary from Bitquery for each one. For related tasks, see how to pull raw DEX trade data for a watchlist or explore the full Bitquery integration overview.
