Ajasra 24394d7b92 Add custom exceptions and enhance error handling in exchanges module
- Introduced a new `exceptions.py` file containing custom exceptions for the exchanges module, improving error specificity and handling.
- Updated the `factory.py` and `registry.py` files to utilize the new exceptions, enhancing robustness in error reporting and logging.
- Implemented validation logic in `ExchangeCollectorConfig` to ensure proper configuration, raising appropriate exceptions when validation fails.
- Enhanced logging throughout the factory methods to provide better insights into the collector creation process and error scenarios.
- Added comprehensive documentation for the exchanges module, detailing the architecture, error handling, and usage examples.

These changes significantly improve the error handling and maintainability of the exchanges module, aligning with project standards and enhancing developer experience.
2025-06-07 14:29:09 +08:00

44 lines
1.6 KiB
Markdown

# 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](exchanges.md)**: Detailed technical documentation of the exchange module architecture, including factory pattern, configuration, and error handling.
- **Exchange-Specific Implementations**:
- **[OKX](okx_collector.md)**: Complete guide for OKX exchange integration
## Quick Links
- [Data Collection Architecture](../data_collectors.md)
- [Error Handling Guide](../error_handling.md)
- [Logging Configuration](../logging.md)
## Exchange Status
| Exchange | Status | Features | Documentation |
|----------|---------|-----------|---------------|
| OKX | ✅ Production | Trades, Order Book, Ticker, Candles | [Guide](okx_collector.md) |
| Binance | 🔄 Planned | TBD | - |
| Coinbase | 🔄 Planned | TBD | - |
## Adding New Exchanges
See [Technical Documentation](exchanges.md) 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
- Report issues in the project issue tracker
- See [Contributing Guide](../../CONTRIBUTING.md) for development guidelines
- Check [Known Issues](exchanges.md#known-issues) for current limitations
---
*Back to [Main Documentation](../../README.md)*