Skip to main content
ChainStream provides five ways to access on-chain data. Each has different strengths — choose based on your use case.

Quick Comparison

REST APIGraphQL APIWebSocketMCP ToolsCLI
Best forSimple queries, system integrationFlexible analytics, custom aggregationReal-time price and trade streamsAI Agent integrationScripts, CI/CD, terminal workflows
Endpoint56 /v2/* pathsSingle endpointwss://realtime-dex.chainstream.io/...Via MCP protocolnpx @chainstream-io/cli
AuthX-API-KEY headerX-API-KEY headerURL ?token= paramBearer Tokencli login / API Key
ResponseFixed JSON schemaClient-selected fieldsReal-time pushStructured tool resultsJSON / table output
AggregationPre-defined endpointscount / sum / avg / min / max / uniqNoneDepends on underlying APINone
Chainssol / eth / bscsol / eth / bscsol / eth / bscsol / eth / bscsol / eth / bsc
SDKTS / Python / Go / RustAny GraphQL clientTS SDK built-inMCP clientsN/A

When to Use Each

REST API

Use when: you need a quick, specific data lookup — token price, wallet balance, trade list — and want a predictable response schema.Examples: display token info in a dApp, check wallet PnL, get ranking lists.REST API Reference

GraphQL API

Use when: you need flexible, analytical queries — aggregate trades, filter across dimensions, select only the fields you need.Examples: top traders by volume, OHLC candlestick data, token holder distribution analysis.GraphQL Overview

WebSocket

Use when: you need real-time data pushed to your application — price ticks, new trades, wallet activity changes.Examples: live price feed, trade activity stream, new token creation alerts.Real-time Streaming

MCP Tools

Use when: you’re building an AI Agent that needs to query on-chain data through natural language or structured tool calls.Examples: Claude / GPT analyzing token security, AI assistant tracking smart money, automated research workflows.MCP Server Introduction

Data Coverage by Interface

All interfaces share the same underlying data pipeline and support all 3 chains (Solana, Ethereum, BSC).
Data TypeRESTGraphQLWebSocketMCP
Token metadata & priceYesYes (DEXTrades, TokenSearch)Yes (Token series)Yes (token_get_price)
Trade historyYesYes (DEXTrades)Yes (Trade series)Yes (trade_get)
Wallet balance & PnLYesYes (BalanceUpdates, WalletTokenPnL)Yes (Wallet series)Yes (wallet_get_balance)
OHLCV / K-lineYesYes (OHLC)Yes (Candle series)Yes (token_get_candles)
Token holdersYesYes (TokenHolders)NoYes (token_get_holders)
DEX pool liquidityYesYes (DEXPools, PoolLiquiditySnapshots)Yes (DexPool series)Yes (dexpool_get)
Rankings (hot, new)YesNoYes (Ranking series)Yes (ranking_get_hot_tokens)
DeFi swap / createYesNoNoYes (dex_swap, pumpfun_create)
KYT / complianceYesNoNoNo
Webhook managementYesNoNoYes (webhook_*)
GraphQL excels at flexible analytical queries with aggregation. REST covers the broadest feature set including DeFi operations and compliance. WebSocket is the only way to get real-time push updates. MCP wraps REST capabilities for AI agents.

Next Steps

Quickstart

Make your first API call in 5 minutes.

GraphQL First Query

Run your first GraphQL query.

Supported Chains

See all supported chains and DEXes.