Module v2

Source
Expand description

Version 2 provider architecture Provider V2 - Next generation provider architecture

This module defines the improved provider architecture that aligns with the consolidated WebSocket implementation using MessageHandler pattern.

Key improvements over V1:

  • Separation of concerns: REST APIs vs real-time streaming
  • Event-driven architecture using callbacks instead of channels
  • Integration with WebSocketClient/MessageHandler pattern
  • Cleaner trait boundaries and reduced coupling
  • Better error handling and resource management

Structs§

HybridConnection
Unified connection managing both REST and WebSocket
ProviderRegistry
Registry for managing multiple providers

Traits§

DataEventHandler
Data event callbacks for real-time streaming
HybridProvider
Combined provider trait for exchanges that support both REST and streaming
ProviderFactory
Factory trait for creating provider instances
RestProvider
REST API provider for exchange metadata and historical data This trait focuses purely on HTTP-based operations
StreamProvider
Real-time streaming provider using WebSocket This trait handles live market data streaming