Protobuf Schema Repository
Support Matrix
token-supplies, token-prices, token-holdings, token-market-caps, trade-stats Topics. See full Topic list for details.Kafka Streams vs WebSocket Selection Guide
When to Choose Kafka Streams
Latency Sensitive
Message Reliability
Complex Processing
Horizontal Scaling
When to Choose WebSocket
Rapid Prototyping
Unified Interface
Browser-side
Dynamic Filtering
Comparison Summary
Credential Acquisition
Kafka Streams uses independent authentication credentials and requires contacting the ChainStream team to apply for access.Contact to Apply
Receive Credentials
- Username
- Password
- Broker address list
Configure Connection
Connection Configuration
Broker Address
SASL_SSL Connection Configuration
- Python
- JavaScript
- Go
Topic Naming Convention & Complete List
Naming Convention
Topics follow this naming pattern:{chain} includes: sol, bsc, eth, tron
Message Types
Complete Topic List
- Cross-Chain Topics
- Solana Specific
- EVM Specific
- TRON Specific
{chain} with sol, bsc, eth):Consumption Modes & Offset Management
Two core configurations to consider when subscribing to topics:Offset Strategy Selection
Consumers need to decide where to start reading messages after connecting to Kafka. Two common strategies:- Consume Latest Only
- Persistent Consumption
Group ID Rules
Deploying multiple instances with the same Group ID enables failover and load balancing—messages from the same topic will only be consumed by one instance in the Group, with Kafka automatically distributing partitions among instances.Quick Start: First Consumer in 5 Minutes
The following example shows how to consume theeth.dex.trades topic and parse DEX trade data.
Get Protobuf Schema
Install Dependencies
Configure and Consume
Core Data Structures
All message types share these base structures (defined incommon/common.proto):
Base Structures
- Block
- Transaction
- Instruction
- DApp
Main Message Types
TradeEvent - DEX Trade Events
TradeEvent - DEX Trade Events
{chain}.dex.tradesTokenEvent - Token Events
TokenEvent - Token Events
{chain}.tokens, {chain}.tokens.createdBalanceEvent - Balance Change Events
BalanceEvent - Balance Change Events
{chain}.balancesDexPoolEvent - Liquidity Pool Events
DexPoolEvent - Liquidity Pool Events
{chain}.dex.poolsCandlestickEvent - Candlestick Data
CandlestickEvent - Candlestick Data
{chain}.candlesticksTradeStatEvent - Trade Statistics
TradeStatEvent - Trade Statistics
{chain}.trade-statsTokenHoldingEvent - Holding Statistics
TokenHoldingEvent - Holding Statistics
{chain}.token-holdingsTokenPriceEvent - Price Events
TokenPriceEvent - Price Events
{chain}.token-pricesTokenSupplyEvent - Supply Events
TokenSupplyEvent - Supply Events
{chain}.token-suppliesMessage Characteristics & Considerations
Developers need to be aware of the following message characteristics when consuming Kafka Streams:Unfiltered Complete Data Stream
Unfiltered Complete Data Stream
Same Entity Messages Are Ordered
Same Entity Messages Are Ordered
Messages May Duplicate
Messages May Duplicate
Message Integrity Guaranteed
Message Integrity Guaranteed
Protobuf Binary Format
Protobuf Binary Format
Latency Model
Kafka Streams latency depends on the processing stages data passes through in the pipeline. Different topics from the same chain have different latencies:Broadcasted vs Committed
Pipeline Latency
Each transformation layer from blockchain node to Kafka topic (parsing, structuring, enrichment) introduces approximately 100-1000ms latency:- raw topic: Lowest latency, closest to raw node data
- transactions topic: Parsed and structured
- dextrades topic: Relatively higher latency, but richer data
Best Practices
Parallel Partition Consumption
Kafka topics are divided into multiple partitions, each partition needs parallel reading to maximize throughput. Message partition keys are set to token address or wallet address (unified across all chains), ensuring:- All events for the same token route to the same partition, guaranteeing order
- All balance changes for the same wallet route to the same partition, facilitating state tracking

