Use Case
You want to build a real-time DEX analytics dashboard by streaming trade data across multiple Solana DEX protocols (Raydium, Orca, Meteora, PumpFun, and others) into ClickHouse. Thedex_trades entity aggregates trades from all supported protocols into a single, unified schema.
Pipeline Configuration
Create a new pipeline
In the GoldRush Platform, navigate to Manage Pipelines and click Create Pipeline. Name it
dex-analytics.Select your source
Choose Solana as the chain and Swaps as the data type. This streams every decoded DEX trade across all supported Solana protocols.
Verify Data
Sample Dashboard Queries
Volume by protocol over the last 24 hours:Production Tips
- Flush interval: A 3-second flush interval keeps dashboard data fresh. Increase to 5-10 seconds if write throughput becomes a bottleneck.
- volume_usd > 10 filter: Removes dust trades that add noise to analytics. Adjust the threshold based on your use case.
- Protocol coverage: The
sol_dex_tradesentity aggregates trades from all supported Solana protocols. Theprotocol_namecolumn identifies the source (Raydium, Orca, Meteora, etc.). - Materialized views: For high-frequency dashboard queries, consider ClickHouse materialized views to pre-aggregate data by time bucket and protocol.