Skip to content

bitquery/grpc-code-samples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoreCast - Smart Solana gRPC Streams Examples

This repository contains quick start code examples for Bitquery's CoreCast Smart Solana gRPC streams in multiple programming languages (JavaScript, Python, Go, and Rust).

What are Bitquery Smart gRPC Streams?

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.

Key Benefits

  • 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

Available Stream Topics

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

Quick Start

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

Prerequisites

  1. Get your API token: Generate one at Bitquery Account
  2. Configure authentication: Add your token to the config.yaml file in each demo
  3. Install dependencies: Follow the README in each language-specific folder

Basic Configuration

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

Documentation

Core Documentation

Advanced Topics

Authentication Setup

Schema and Packages

The protobuf schemas are available as installable packages:

  • Python: pip install bitquery-corecast-proto
  • Node.js: npm install bitquery-corecast-proto

Getting Started

  1. Clone this repository
  2. Choose your preferred language (JavaScript, Python, Go, or Rust)
  3. Follow the README in the respective language folder
  4. Configure your API token in config.yaml
  5. Run the example and start streaming Solana data!

Support

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •