This repository contains quick start code examples for Bitquery's CoreCast Smart Solana gRPC streams in multiple programming languages (JavaScript, Python, Go, and Rust).
Bitquery Smart gRPC Streams provide low-latency, context-aware, topic-wise event delivery from the Solana blockchain. Unlike raw gRPC streams, Smart Streams enrich and filter events so your application receives only the data it needs (trades, balances, token context, program metadata). The data is sent in protobuf format with publicly available schemas for easy parsing.
- Low latency: Stream RPCs for near real-time delivery
- Strong typing: Protobuf contracts for stable schemas and efficient encoding
- Context-aware filtering: Server-side filtering to reduce bandwidth and speed up processing
- Multiple topics: Subscribe only to what you need
Bitquery exposes multiple topics for targeted subscriptions:
- transactions: Finalized transactions with instructions, logs, and status
- transfers: All token transfers with token context
- dex_trades: DEX trade/swaps across supported protocols
- dex_orders: Order lifecycle updates where applicable
- dex_pools: Pool creation/updates and liquidity changes
- balances: Balance updates for tracked accounts and mints
Each language folder contains a complete example with configuration:
- JavaScript:
js-demo/- Node.js implementation - Python:
python-demo/- Python implementation - Go:
go-demo/- Go implementation - Rust:
rust-demo/- Rust implementation
- Get your API token: Generate one at Bitquery Account
- Configure authentication: Add your token to the
config.yamlfile in each demo - Install dependencies: Follow the README in each language-specific folder
server:
address: "corecast.bitquery.io"
authorization: "<your_api_token>"
insecure: false
stream:
type: "transfers" # or: transactions, dex_trades, dex_orders, dex_pools, balances
filters:
signers:
- "7epLWkFd7xo18k4a4ySmN2UiiAFELDTV2ZNYAedCNh" # example address- Introduction to gRPC Streams - Overview of Smart gRPC Streams and their benefits
- Authentication - How to authenticate with Bitquery gRPC streams
- Stream Topics - Detailed documentation for each stream topic
- Best Practices - Production-ready implementation guidelines
- Examples - Real-world use cases including Pump.fun and copy trading bots
- Live Reload Configuration - Dynamic configuration updates
- Error Handling - Comprehensive error handling strategies
- Get API Token - Generate your authentication token
- Token Generation Guide - Step-by-step instructions for creating tokens
The protobuf schemas are available as installable packages:
- Python:
pip install bitquery-corecast-proto - Node.js:
npm install bitquery-corecast-proto
- Clone this repository
- Choose your preferred language (JavaScript, Python, Go, or Rust)
- Follow the README in the respective language folder
- Configure your API token in
config.yaml - Run the example and start streaming Solana data!
- Documentation: Bitquery Docs
- Community: Join our Telegram or follow us on Twitter
- Issues: Report issues on our GitHub
This project is licensed under the MIT License.