This section covers how to stream real-time data from the Injective Indexer API using StreamManagerV2.
StreamManagerV2
StreamManagerV2 provides an event-based architecture for managing gRPC streams with automatic retry, exponential backoff, and comprehensive error handling.
Key Features
- Event-based lifecycle - Listen to connect, disconnect, error, and data events
- Automatic retry - Configurable exponential backoff with retry limits
- Error handling - Distinguishes retryable vs non-retryable errors
- Persistent mode - Continue retrying indefinitely after max attempts
- Fine-grained control - Start, stop, and manage stream lifecycle
Basic Usage
Available Stream Classes
IndexerGrpcAccountStreamV2 - Account balance and transaction streams
IndexerGrpcAccountPortfolioStreamV2 - Portfolio value streams
IndexerGrpcArchiverStreamV2 - Archiver data streams
IndexerGrpcAuctionStreamV2 - Auction bid streams
IndexerGrpcDerivativesStreamV2 - Derivatives market streams
IndexerGrpcExplorerStreamV2 - Blockchain explorer streams
IndexerGrpcMitoStreamV2 - Mito vault streams
IndexerGrpcOracleStreamV2 - Oracle price feed streams
IndexerGrpcSpotStreamV2 - Spot market streams
IndexerGrpcTradingStreamV2 - Trading automation streams
Retry Configuration
Event Types
connect - Stream successfully connected
disconnect - Stream disconnected with reason
error - Stream error occurred
data - New data received
stateChange - Stream state changed
retry - Retry attempt started
warn - Warning message
Stream Examples
- Account - Stream account updates
- Archiver - Stream archiver data
- Auction - Stream auction updates
- Derivatives - Stream derivatives market updates
- Explorer - Stream explorer updates
- Mito - Stream Mito vault updates
- Oracle - Stream oracle price updates
- Portfolio - Stream portfolio updates
- Spot - Stream spot market updates
- Trading - Stream trading automation updates
Last modified on March 30, 2026