The Scenario
You run a quantitative trading operation focused on Solana arbitrage. Your entry signal model needs to be backtested against real trade data — specifically, the last 500 trades across 5 Raydium liquidity pools you've been monitoring. You want timestamp, token pair, price, amount, and DEX name in a Google Sheet so you can run your signal logic against it using standard sheet formulas.
The trades happened in the last hour. Bitquery's EAP streaming API has the data. You've used the API before via curl. You've never pulled it directly into a sheet.
The bad version:
- Write a curl command hitting the Bitquery EAP endpoint with the right query, pipe it to jq to flatten the nested JSON, redirect to a CSV
- Open the CSV in a text editor first because Google Sheets import mangles the timestamp column format, manually fix the date column before importing
- Discover that two of the five pool addresses returned no results because you used the wrong field name for Solana vs. EVM, go back to the docs, update the query, re-run
Your backtest window is closing. Every 15 minutes of delay is another 15 minutes of recent trade data you won't have in the sample.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Google Sheet. It reads your pool addresses from the sheet, hits Bitquery's Solana endpoint, and populates your results in a flat table — no JSON, no curl, no manual import.
Open the SheetXAI sidebar and paste this prompt:
Query Bitquery's EAP streaming endpoint for the last 500 Solana DEX trades across the pool addresses in column A and write trade timestamp, token pair, price, amount, and DEX name into columns B through F
What You Get
- Column B: trade timestamp, ISO 8601
- Column C: token pair (e.g., SOL/USDC)
- Column D: trade price, numeric
- Column E: trade amount in token units
- Column F: DEX name (Raydium, Orca, etc.)
- Up to 500 rows, sorted by timestamp descending
- Pools that returned no trades in the window log a note rather than leaving rows blank
What If the Data Is Not Quite Ready
You want only trades above a minimum size to reduce noise
Query Bitquery's EAP Solana endpoint for the last 500 DEX trades across pools in column A. Include only trades where amount exceeds 1,000 SOL equivalent. Write timestamp, token pair, price, amount, and DEX name into columns B–F.
You have Solana token addresses in column A instead of pool addresses and need current price and 24h volume
For each Solana token address in column A, fetch current price and 24-hour trading volume from Bitquery and write the results into columns B and C.
You want to join trade data against a second tab that maps token addresses to your internal ticker symbols
Pull the last 500 Solana DEX trades from Bitquery for pools in column A. Cross-reference the token addresses against the ticker mapping in sheet "Tickers" (address in column A, ticker in column B). Write timestamp, internal ticker, price, amount, and DEX name into columns A–E of sheet "Trades".
You want to clean up tiny trades, flag outliers, calculate a rolling VWAP, and pull the data — all in one prompt
Query Bitquery's Solana EAP for the last 500 DEX trades across pools in column A. Remove trades below 10 SOL. Flag trades where price deviates more than 3% from the pool's 24h average in a "flag" column. Calculate a 20-trade rolling VWAP in the next column. Write all results to sheet "Backtest Data".
The pattern: filtering, flagging, and derived metrics all go into the same prompt — you don't need separate steps.
Try It
Get the 7-day free trial of SheetXAI and open a Google Sheet with your Solana pool addresses in column A, then ask SheetXAI to pull the last 500 trades from Bitquery's EAP endpoint. For related tasks, see how to pull DEX trade data for an ERC-20 watchlist or explore the full Bitquery integration overview.
