- Introduced a modular architecture for data processing, including common utilities for validation, transformation, and aggregation. - Implemented `StandardizedTrade`, `OHLCVCandle`, and `TimeframeBucket` classes for unified data handling across exchanges. - Developed `OKXDataProcessor` for OKX-specific data validation and processing, leveraging the new common framework. - Enhanced `OKXCollector` to utilize the common data processing utilities, improving modularity and maintainability. - Updated documentation to reflect the new architecture and provide guidance on the data processing framework. - Created comprehensive tests for the new data processing components to ensure reliability and functionality.
52 lines
1.0 KiB
Python
52 lines
1.0 KiB
Python
"""
|
|
Common data processing utilities for all exchanges.
|
|
|
|
This package contains shared components for data validation, transformation,
|
|
and aggregation that can be used across different exchange implementations.
|
|
"""
|
|
|
|
from .data_types import (
|
|
StandardizedTrade,
|
|
OHLCVCandle,
|
|
MarketDataPoint,
|
|
DataValidationResult
|
|
)
|
|
|
|
from .aggregation import (
|
|
TimeframeBucket,
|
|
RealTimeCandleProcessor,
|
|
CandleProcessingConfig
|
|
)
|
|
|
|
from .transformation import (
|
|
BaseDataTransformer,
|
|
UnifiedDataTransformer,
|
|
create_standardized_trade
|
|
)
|
|
|
|
from .validation import (
|
|
BaseDataValidator,
|
|
ValidationResult
|
|
)
|
|
|
|
__all__ = [
|
|
# Data types
|
|
'StandardizedTrade',
|
|
'OHLCVCandle',
|
|
'MarketDataPoint',
|
|
'DataValidationResult',
|
|
|
|
# Aggregation
|
|
'TimeframeBucket',
|
|
'RealTimeCandleProcessor',
|
|
'CandleProcessingConfig',
|
|
|
|
# Transformation
|
|
'BaseDataTransformer',
|
|
'UnifiedDataTransformer',
|
|
'create_standardized_trade',
|
|
|
|
# Validation
|
|
'BaseDataValidator',
|
|
'ValidationResult'
|
|
] |