Skip to main content
The DEXTrades Cube contains per-trade DEX swap events — the most granular trading data available. Use it to query individual trades, analyze wallet activity, track token prices, and find top traders.
All examples below use network: sol (Solana). Replace with eth, bsc, or polygon for other supported chains.

How do I get the latest DEX trades?

Fetch the 10 most recent DEX trades on Solana, including block info, transaction hash, buy/sell details, and the DEX protocol.
Open in GraphQL IDE — paste the query above to run it interactively with auto-complete and schema exploration.
  • Switch chain: Replace network: sol with network: eth, network: bsc, or network: polygon
  • Increase results: Change count: 10 to up to 10000
  • Add time filter: Add where: {Block: {Time: {after: "2025-03-01T00:00:00Z"}}} to scope to a time range
  • Filter by DEX: Add where: {Trade: {Dex: {ProtocolName: {is: "Raydium"}}}} to limit to a specific protocol

How do I get trades for a specific token?

Get trades for a specific token by passing its address via the tokenAddress selector.
Replace TOKEN_ADDRESS with the actual token mint address (e.g. EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v for USDC on Solana). See token metadata to look up addresses by name.
  • Filter by minimum amount: Add where: {Trade: {Buy: {Amount: {gt: 1000}}}} to only see large trades
  • Filter by price range: Add where: {Trade: {Buy: {PriceInUSD: {gte: 0.001, lte: 1.0}}}} to scope to a price band
  • Exclude suspect trades: The IsSuspect = false filter is applied by default — bot/MEV trades are already excluded

How do I get all trades by a wallet?

Get all trades by a specific wallet address.
The walletAddress selector matches trades where the given wallet is either the buyer or the seller.
  • Filter to a single token: Combine with tokenAddress: {is: "TOKEN_ADDRESS"} to see only trades for a specific token by this wallet
  • Add time window: Add where: {Block: {Time: {after: "2025-03-01T00:00:00Z"}}} to limit to recent trades
  • Increase limit: Set count: 100 to retrieve more history (max 10,000)

How do I get a token’s current price?

Get the latest price for a token from its most recent non-suspect trade.
  • Multiple prices: Increase count to get a series of recent prices for averaging
  • Cross-chain: Use network: eth to get the same token’s price on Ethereum (if it exists on that chain)
For reliable token price data over time, consider using the Pairs Cube instead — it provides pre-computed candlestick data with open/high/low/close prices per minute.

How do I find the top traders for a token?

Find the top traders for a token using aggregation. This query groups trades by buyer wallet and returns the total buy count and volume.
  • Sort by volume: The results are grouped by the dimension fields — select fewer dimensions for higher-level aggregation
  • Time-scoped leaderboard: Add where: {Block: {Time: {after: "2025-03-01T00:00:00Z"}}} to limit to a specific period
  • Exclude small trades: Add Trade: {Buy: {Amount: {gt: 100}}} to the where clause
When you include metric fields (count, sum) alongside dimension fields, the API automatically groups results by the selected dimensions. See Metrics & Aggregation for full details.

Multi-Chain Examples

The same queries work across all supported chains — just change the network parameter.

Next Steps

Transfers

Query on-chain token transfer data.

Balances & Holders

Look up wallet balances, balance history, and top holders.

Pools & Liquidity

Explore DEX pools and liquidity data.

OHLC & Statistics

Fetch candlestick data, trade stats, market cap, and token metadata.