Skip to main content

What Are Query Templates

Query templates are pre-written GraphQL queries that cover the most common analytical use cases across Solana, Ethereum, and BSC. Each template targets a specific Cube and comes pre-filled with the correct query structure, fields, and filter arguments — ready to run after replacing placeholder values. Templates help you:
  • Learn the schema by example — see how fields, filters, and ordering work in practice
  • Start quickly without writing queries from scratch
  • Discover Cubes you might not have known about

Accessing Templates

1

Open the sidebar

Click the sidebar toggle or press Ctrl/Cmd+B to open the left panel.
2

Select the Queries tab

The sidebar has two tabs: Queries (templates) and Saved (your saved queries). Select Queries.
3

Browse by chain and Cube

Templates are organized in a tree: Chain (Solana / Ethereum / BSC) → Cube (DEXTrades, Transfers, etc.) → Template.
4

Click to load

Click any template to load it into the query editor. Placeholder values are highlighted for easy replacement.

Template Organization

Templates follow a two-level hierarchy:
Chain (Solana / Ethereum / BSC)
 └── Cube
      └── Template
Each chain contains the same set of Cubes and templates, pre-configured with the correct network value (sol, eth, or bsc).

Template Catalog

CubeTemplatesCount
DEXTradesLatest Trades · Token Trades · Pair Trades · Trades by DEX · Wallet Trades5
TransfersToken Transfers · Wallet Transfers2
BalanceUpdatesToken Balance Updates · Wallet Balance Updates2
DEXPoolsPool Info · Token Pools · Liquidity Snapshots3
TokenSupplyUpdatesMint & Burn Events · Market Cap (via TokenSupplyUpdates)2
TokenHoldersTop Holders1
WalletTokenPnLWallet PnL1
PairsPrice Candles1
TokensTrade Statistics · Search Tokens (via token dimensions)2
The most commonly used Cubes are covered across 19 templates. Each template is available for all supported chains.

Template Details by Cube

TemplateDescriptionPlaceholders
Latest TradesMost recent DEX trades on the network
Token TradesTrades involving a specific tokenTOKEN_ADDRESS
Pair TradesTrades for a specific token pairTOKEN_ADDRESS (×2)
Trades by DEXTrades filtered by DEX protocol name
Wallet TradesAll DEX trades executed by a walletWALLET_ADDRESS
TemplateDescriptionPlaceholders
Token TransfersTransfer events for a specific tokenTOKEN_ADDRESS
Wallet TransfersAll transfers sent or received by a walletWALLET_ADDRESS
TemplateDescriptionPlaceholders
Token Balance UpdatesBalance change events for a specific tokenTOKEN_ADDRESS
Wallet Balance UpdatesAll balance changes for a walletWALLET_ADDRESS
TemplateDescriptionPlaceholders
Pool InfoMetadata and reserves for a specific poolPOOL_ADDRESS
Token PoolsAll liquidity pools containing a tokenTOKEN_ADDRESS
Liquidity SnapshotsHistorical liquidity data for a pool over timePOOL_ADDRESS
TemplateDescriptionPlaceholders
Mint & Burn EventsMint and burn events affecting a token’s supplyTOKEN_ADDRESS
Market CapMarket capitalization snapshot for a tokenTOKEN_ADDRESS
TemplateDescriptionPlaceholders
Top HoldersLargest holders of a specific token by balanceTOKEN_ADDRESS
TemplateDescriptionPlaceholders
Wallet PnLRealized and unrealized PnL for a wallet-token pairWALLET_ADDRESS, TOKEN_ADDRESS
TemplateDescriptionPlaceholders
Price CandlesOHLC candlestick data at configurable intervalsTOKEN_ADDRESS
TemplateDescriptionPlaceholders
Trade StatisticsAggregated trade volume, count, and unique tradersTOKEN_ADDRESS
Search TokensFull-text search for tokens by name, symbol, or address

Placeholders

Templates use uppercase placeholders to indicate values you need to replace with real on-chain addresses before executing.
PlaceholderDescriptionExample
TOKEN_ADDRESSToken contract/mint addressEPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v (USDC on Solana)
WALLET_ADDRESSWallet public address5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1
POOL_ADDRESSDEX liquidity pool address58oQChx4yWmvKdwLLZzBi4ChoCc2fqCUWBkwMihLYQo2
Placeholders appear as literal strings in the query (e.g. MintAddress: {is: "TOKEN_ADDRESS"}). Replace the entire placeholder string including quotes with your actual address.

Example: Using a Template

Here’s how to use the DEXTrades → Latest Trades template on Solana:
1

Open sidebar and select template

Navigate to Solana → DEXTrades → Latest Trades and click to load.
2

Review the loaded query

The editor populates with:
query {
  DEXTrades(
    network: sol
    limit: {count: 10}
    orderBy: Block_Time_DESC
  ) {
    Block { Time Slot }
    Transaction { Hash }
    Trade {
      Buy {
        Currency { MintAddress Symbol Name }
        Amount
        PriceInUSD
      }
      Sell {
        Currency { MintAddress Symbol Name }
        Amount
      }
      Dex { ProtocolName }
    }
  }
}
3

Execute

This template has no placeholders — it fetches the 10 most recent trades. Press Ctrl/Cmd+Enter to run.
4

Iterate

Modify the query to add filters, change the limit, or select different fields. The schema autocomplete helps you discover available options.