Skip to main content
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_...)
The GraphQL API shares the same API Key as the REST Data API. If you already have a key from the REST API, you can reuse it here.

Step 1: Get Your API Key

  1. Log in to ChainStream Dashboard
  2. Go to Applications
  3. Click Create New App (or select an existing app)
  4. Copy your API Key

Step 2: Open the GraphQL IDE

Visit the ChainStream GraphQL IDE: The IDE provides auto-complete, syntax highlighting, inline documentation, and query history — making it the fastest way to explore the schema and build queries.

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.
Open in GraphQL IDE — paste the query above to run it interactively with auto-complete and schema exploration.
Click the Play button (or press 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:
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:
Change network: sol to network: eth to query Ethereum DEX trades (Uniswap, SushiSwap, etc.).
Filter trades from the last hour by adding a where clause:
Filter by token mint address to see trades for a specific token:
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.