MetaExpert is a Python library for cryptocurrency trading that provides a unified interface for multiple exchanges and trading types. The system is designed to be modular, extensible, and easy to use while maintaining high performance and reliability. It currently supports major cryptocurrency exchanges including Binance, Bybit, OKX, Bitget, KuCoin, etc.
The project is built for Python 3.12+ and uses a unified interface for different trading types (spot, futures, options) and market modes (linear, inverse contracts). It supports paper trading, live trading, and backtesting modes.
The project follows a strict set of development principles outlined in the .specify/memory/constitution.md file, which emphasizes a library-first architecture, mandatory Test-Driven Development (TDD).
- Multi-exchange Support: Unified interface for major cryptocurrency exchanges
- Structured Logging: Advanced logging system with context management and security features
- Backtesting: Comprehensive backtesting capabilities for strategy validation
- Modular Architecture: Clean, extensible codebase following SOLID principles
- Security Focused: Automatic filtering of sensitive data in logs
pip install metaexpertpoetry add metaexpertuv add metaexpertIf you have already added MetaExpert, you can update to the latest version by using:
pip install --upgrade metaexpertpoetry update metaexpertuv sync --upgrade-package metaexpertfrom metaexpert.logger import setup_logging, get_logger, LoggerConfig
# Initialize logging system
config = LoggerConfig.for_production()
setup_logging(config)
# Get logger in your module
logger = get_logger(__name__)
logger.info("Application started")MetaExpert includes a sophisticated logging system with:
- Structured Logging: Add context to your log messages
- Context Management: Use LogContext for correlated events
- Security Filtering: Automatic masking of sensitive data
- Performance Monitoring: Track operation durations
- Environment-Specific Presets: Development, production, and backtesting configurations
For more details, see the logging guide.
Comprehensive documentation is available:
- API Reference
- Logging Guide - Detailed guide on logging system
- CLI Guide - Command-line interface usage
- Troubleshooting - Solutions to common issues
- Tutorials - Step-by-step tutorials
You can find examples in the example's directory:
- Expert Binance EMA Strategy
- Expert Bybit RSI Strategy
- Expert OKX MACD Strategy
- Expert MEXC PaParabolic SAR Strategy
Each example demonstrates how to use MetaExpert with different exchanges and trading strategies, including proper logging configuration.
Project at the initial stage.
See the latest commits.