Skip to content

Scifi-ally/OrderFlow-Lab

Repository files navigation

CryptoBot 2.1 - Enterprise Edition

🚀 Overview

CryptoBot 2.1 is a high-performance, self-evolving cryptocurrency trading bot designed for both paper trading and live execution. It features an advanced ensemble ML architecture (LSTM + Transformer + XGBoost), robust risk management, and a real-time WebSocket-based dashboard.

✨ Key Features

  • Ensemble ML Models: Combines LSTM (Temporal), Transformer (Attention-based), and XGBoost (Tabular) for superior prediction accuracy.
  • Real-Time Streaming: Uses WebSockets for sub-second market data updates and UI responsiveness.
  • Enterprise Risk Management:
    • Dynamic position sizing (ATR-based).
    • Portfolio correlation checks.
    • Volatility halts and daily loss limits.
    • "Go Live" safety gates.
  • Modern Dashboard: Dark-mode, responsive UI with TradingView-style charts.
  • Dockerized: Ready for deployment with docker-compose.

🛠️ Tech Stack

  • Backend: Python 3.9+, FastAPI, TensorFlow, XGBoost, Pandas, AIOHTTP.
  • Frontend: HTML5, Vanilla JS, Lightweight Charts (TradingView).
  • Database: SQLite (WAL mode).
  • Infrastructure: Docker.

⚡ Quick Start

1. Run with Docker (Recommended)

docker-compose up --build

Access the dashboard at http://localhost:8000.

2. Run Locally

Prerequisites: Python 3.9+

# Install dependencies
pip install -r requirements.txt

# Run the bot
python backend/main.py

🔒 Security

  • API Keys: Protected endpoints require X-API-Key header.
  • Safety Gates: Strict validation required before enabling real trading.
  • Environment Variables: Sensitive keys should be stored in .env.

🧪 Testing

Run the unit test suite to verify core logic:

python -m unittest discover tests

📈 Strategy

The bot uses a multi-timeframe approach (1h, 4h, 1d) to identify trends and mean-reversion opportunities. The Regime Classifier detects market conditions (Trending vs. Choppy) to adapt strategy parameters dynamically.


Disclaimer: Trading cryptocurrencies involves risk. This software is for educational purposes. Use at your own risk.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published