Ajasra 68030730e9 Implement comprehensive transformation module with safety limits and validations
- Introduced a new transformation module that includes safety limits for trade operations, enhancing data integrity and preventing errors.
- Refactored existing transformation logic into dedicated classes and functions, improving modularity and maintainability.
- Added detailed validation for trade sizes, prices, and symbol formats, ensuring compliance with trading rules.
- Implemented logging for significant operations and validation checks, aiding in monitoring and debugging.
- Created a changelog to document the new features and changes, providing clarity for future development.
- Developed extensive unit tests to cover the new functionality, ensuring reliability and preventing regressions.

These changes significantly enhance the architecture of the transformation module, making it more robust and easier to manage.
2025-06-07 13:23:59 +08:00

29 lines
871 B
Python

"""
Common data transformation utilities for all exchanges.
This package provides common transformation patterns and base classes
for converting exchange-specific data to standardized formats.
"""
from .base import BaseDataTransformer
from .unified import UnifiedDataTransformer
from .trade import create_standardized_trade, batch_create_standardized_trades
from .time_utils import timestamp_to_datetime
from .numeric_utils import safe_decimal_conversion
from .normalization import normalize_trade_side, validate_symbol_format
__all__ = [
# Base classes
'BaseDataTransformer',
'UnifiedDataTransformer',
# Trade transformation
'create_standardized_trade',
'batch_create_standardized_trades',
# Utility functions
'timestamp_to_datetime',
'safe_decimal_conversion',
'normalize_trade_side',
'validate_symbol_format'
]