Estimated time: 5 minutes
Prerequisites
Before you begin, make sure you have:- A registered ChainStream account (Register here)
- An API Key (starts with
cs_live_...)
Step 1: Get Your API Key
- Log in to ChainStream Dashboard
- Go to Applications
- Click Create New App (or select an existing app)
- Copy your API Key
Step 2: Open the GraphQL IDE
Visit the ChainStream GraphQL IDE:GraphQL IDE
Step 3: Configure Authentication
In the IDE, open the Headers panel (bottom-left) and add your API Key:Step 4: Run a Sample Query
Paste the following query into the editor. It fetches the latest 10 DEX trades on Solana, including block time, transaction hash, buy/sell token info, amounts, USD price, and the DEX protocol name.Ctrl+Enter / Cmd+Enter) to execute.
cURL Equivalent
You can run the same query from your terminal:Response Example
A successful response looks like this:Understanding the Response
The response mirrors the structure of your query:| Path | Description |
|---|---|
Block.Time | Block timestamp in ISO 8601 format |
Block.Slot | Solana slot number (Solana-specific) |
Transaction.Hash | On-chain transaction hash |
Trade.Buy.Currency.MintAddress | Token address of the bought asset |
Trade.Buy.Amount | Amount of the bought token |
Trade.Buy.PriceInUSD | USD price of the bought token at trade time |
Trade.Sell.Currency.MintAddress | Token address of the sold asset |
Trade.Sell.Amount | Amount of the sold token |
Trade.Dex.ProtocolName | DEX protocol that executed the trade (e.g. Raydium, Orca, PancakeSwap) |
The
extensions.credits object shows how many billing credits this query consumed and your remaining balance. See Billing & Credits for details.Try Modifying the Query
Now that you have a working query, try these modifications:Switch to Ethereum
Switch to Ethereum
Change
network: sol to network: eth to query Ethereum DEX trades (Uniswap, SushiSwap, etc.).Add a time filter
Add a time filter
Filter trades from the last hour by adding a
where clause:Query a specific token
Query a specific token
Filter by token mint address to see trades for a specific token:
Add aggregation
Add aggregation
Count total trades per DEX protocol:
Next Steps
Schema & Data Model
Explore all 25 Cubes, field types, filtering operators, and aggregation functions.
Query Examples
Browse real-world query examples for DEX trades, transfers, OHLC, holders, and more.
GraphQL IDE Guide
Master the IDE — query templates, saved queries, variables panel, and code export.
Billing & Credits
Understand how query credits are calculated and how to optimize costs.

