Data Streaming & Event Subscriptions
Data Streaming
Stream real-time blockchain blocks, account updates, transaction data, and on-chain events across supported networks. Tatum offers gRPC feeds and WebSocket subscriptions (soon) to fit any backend or frontend architecture.
What is data streaming?
Data streaming allows applications to receive real-time updates from supported blockchains as events occur on-chain. Instead of repeatedly polling for updates, streaming establishes persistent connections that push data to your application the moment transactions are processed, balances change, or blocks are produced.
This is required for applications that need up-to-the-second data such as trading platforms monitoring prices and liquidations, DeFi protocols tracking user interactions, NFT marketplaces detecting sales and transfers, analytics platforms collecting comprehensive chain metrics, and wallets displaying real-time balance and transaction updates.
gRPC Data Streams
High-throughput, low-latency binary streaming via gRPC. Ideal for backend services that process large volumes of block or transaction data with minimal overhead.
- Key features: binary protocol for minimal payload size, strongly typed schema via Protocol Buffers, bidirectional streaming support, and connection keep-alive with backpressure management.
- Best for: high-frequency trading backends, indexers, data pipelines, mission-critical systems requiring guaranteed ordering.
Event Subscriptions
Event subscriptions let you declare what you care about, be an address, a contract, a transaction type, and receive updates the moment they happen on-chain. Your application only processes events that match your filters.
What are Event Subscriptions?
Persistent, bidirectional connections for real-time event delivery. Subscribe to specific addresses, transaction types, or contract events and receive updates as they occur on-chain.
- Key features: address and contract-level filtering, multi-chain subscriptions on a single connection, support for blocks, transactions, log events, and mempool data, and reconnect-friendly subscription IDs.
- Best for: real-time frontend dashboards, wallets, DeFi interfaces, moderate-volume backends, and any application where a developer prefers a standard web protocol.
WebSocket Event Subscriptions
Instead of polling or running a persistent gRPC connection, WebSocket subscriptions let you declare what you care about, be an an address, a contract, a transaction type, and receive updates the moment they happen on-chain. By keeping the connection open, your application only processes events that match your filters.
- Key features: address and contract-level filtering, multi-chain subscriptions on a single connection, support for blocks, transactions, log events, and mempool data, and reconnect-friendly subscription IDs.
- Best for: real-time frontend dashboards, wallets, DeFi interfaces, moderate-volume backends, and any application where a developer prefers a standard web protocol.
Choosing the Right Solution
| RPC | gRPC | WebSocket | |
|---|---|---|---|
| Protocol | HTTP/1.1 | HTTP/2 + Protobuf | WS (TCP upgrade) |
| Connection | Stateless | Persistent | Persistent |
| Data format | JSON | Binary | JSON / binary |
| Latency | High (poll-based) | Lowest | Low |
| Throughput | Low | Highest | Medium |
| Streaming | No | Bidirectional | Bidirectional |
| Filtering | None | Schema-level | Address / event |
| Best for | Simple queries | HFT, indexers, pipelines | Dashboards, wallets, DeFi UI |
| Reconnect handling | Stateless, trivial | Keep-alive + backpressure | Subscription ID-based |
| Parsing | Raw | Raw | Raw + filtered |
Updated about 2 hours ago