2025-05-31 21:58:47 +08:00
|
|
|
"""
|
2025-06-07 13:23:59 +08:00
|
|
|
Common utilities and data structures for the application.
|
2025-05-31 21:58:47 +08:00
|
|
|
|
2025-06-07 13:23:59 +08:00
|
|
|
This package provides shared functionality across different components
|
|
|
|
|
of the system, including data transformation, validation, and aggregation.
|
2025-05-31 21:58:47 +08:00
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
from .data_types import (
|
|
|
|
|
StandardizedTrade,
|
|
|
|
|
OHLCVCandle,
|
|
|
|
|
MarketDataPoint,
|
2025-06-07 01:17:22 +08:00
|
|
|
DataValidationResult,
|
2025-05-31 21:58:47 +08:00
|
|
|
CandleProcessingConfig
|
|
|
|
|
)
|
|
|
|
|
|
2025-06-07 13:23:59 +08:00
|
|
|
from .transformation.trade import (
|
|
|
|
|
TradeTransformer,
|
|
|
|
|
create_standardized_trade,
|
|
|
|
|
batch_create_standardized_trades
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
from .transformation.base import BaseDataTransformer
|
|
|
|
|
from .transformation.unified import UnifiedDataTransformer
|
2025-06-07 01:17:22 +08:00
|
|
|
|
2025-06-07 13:23:59 +08:00
|
|
|
from .transformation.safety import (
|
|
|
|
|
TradeLimits,
|
|
|
|
|
DEFAULT_LIMITS,
|
|
|
|
|
STABLECOIN_LIMITS,
|
|
|
|
|
VOLATILE_LIMITS,
|
|
|
|
|
validate_trade_size,
|
|
|
|
|
validate_trade_price,
|
|
|
|
|
validate_symbol_format
|
2025-05-31 21:58:47 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
from .validation import (
|
|
|
|
|
BaseDataValidator,
|
|
|
|
|
ValidationResult
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
__all__ = [
|
|
|
|
|
# Data types
|
|
|
|
|
'StandardizedTrade',
|
2025-06-07 13:23:59 +08:00
|
|
|
'OHLCVCandle',
|
2025-05-31 21:58:47 +08:00
|
|
|
'MarketDataPoint',
|
|
|
|
|
'DataValidationResult',
|
2025-06-07 01:17:22 +08:00
|
|
|
'CandleProcessingConfig',
|
2025-05-31 21:58:47 +08:00
|
|
|
|
2025-06-07 13:23:59 +08:00
|
|
|
# Trade transformation
|
|
|
|
|
'TradeTransformer',
|
|
|
|
|
'create_standardized_trade',
|
|
|
|
|
'batch_create_standardized_trades',
|
2025-05-31 21:58:47 +08:00
|
|
|
'BaseDataTransformer',
|
|
|
|
|
'UnifiedDataTransformer',
|
2025-06-07 13:23:59 +08:00
|
|
|
|
|
|
|
|
# Safety limits and validation
|
|
|
|
|
'TradeLimits',
|
|
|
|
|
'DEFAULT_LIMITS',
|
|
|
|
|
'STABLECOIN_LIMITS',
|
|
|
|
|
'VOLATILE_LIMITS',
|
|
|
|
|
'validate_trade_size',
|
|
|
|
|
'validate_trade_price',
|
|
|
|
|
'validate_symbol_format',
|
2025-05-31 21:58:47 +08:00
|
|
|
|
|
|
|
|
# Validation
|
|
|
|
|
'BaseDataValidator',
|
2025-06-02 13:42:00 +08:00
|
|
|
'ValidationResult',
|
2025-05-31 21:58:47 +08:00
|
|
|
]
|