Vasily.onl 33f2110f19 Refactor data module to enhance modularity and maintainability
- Extracted `OHLCVData` and validation logic into a new `common/ohlcv_data.py` module, promoting better organization and reusability.
- Updated `BaseDataCollector` to utilize the new `validate_ohlcv_data` function for improved data validation, enhancing code clarity and maintainability.
- Refactored imports in `data/__init__.py` to reflect the new structure, ensuring consistent access to common data types and exceptions.
- Removed redundant data validation logic from `BaseDataCollector`, streamlining its responsibilities.
- Added unit tests for `OHLCVData` and validation functions to ensure correctness and reliability.

These changes improve the architecture of the data module, aligning with project standards for maintainability and performance.
2025-06-10 12:04:58 +08:00
..

Exchange Integrations

Overview

This module provides a standardized interface for collecting real-time data from various cryptocurrency exchanges. It uses a modular architecture that allows easy addition of new exchanges while maintaining consistent behavior and error handling.

Documentation Structure

  • Technical Documentation: Detailed technical documentation of the exchange module architecture, including factory pattern, configuration, and error handling.
  • Exchange-Specific Implementations:
    • OKX: Complete guide for OKX exchange integration

Exchange Status

Exchange Status Features Documentation
OKX Production Trades, Order Book, Ticker, Configurable Timeframes (1s+) Guide
Binance 🔄 Planned TBD -
Coinbase 🔄 Planned TBD -

Features

Core Features

  • Real-time data collection
  • Robust error handling
  • Automatic reconnection
  • Health monitoring
  • Configurable timeframes
    • Support for 1-second intervals
    • Flexible timeframe configuration
    • Custom timeframe aggregation

Exchange-Specific Features

  • OKX: Full WebSocket support with configurable timeframes (1s+)
  • More exchanges coming soon

Adding New Exchanges

See Technical Documentation for detailed implementation guide.

Key Steps:

  1. Create exchange module in data/exchanges/
  2. Implement collector class extending BaseDataCollector
  3. Add WebSocket/REST implementations
  4. Register in ExchangeFactory
  5. Add documentation

Support


Back to Main Documentation