Advanced ML-powered trading bot with real-time market analysis
Project description
Crypto Arbitrage Trading Platform
Production-grade arbitrage trading system in Python 3.11 with real-time market data, signal generation, and automated execution.
Features
- Real-time Market Data: WebSocket feeds from Binance, Kraken, Coinbase, Bybit
- Arbitrage Signals: Cross-exchange and triangular arbitrage detection
- Smart Execution: Atomic multi-leg orders with SOR (Smart Order Router)
- Risk Management: Position limits, circuit breakers, audit logging
- Backtesting: Event-driven simulation with realistic latency/slippage models
- Monitoring: Streamlit dashboard with P&L tracking and performance metrics
- API: FastAPI REST + WebSocket endpoints
Architecture
/arbi/
├── core/
│ ├── data_feed.py # WebSocket market data feeds
│ ├── marketdata.py # Data models and schemas
│ ├── signal.py # Arbitrage signal generation
│ ├── execution.py # Smart order router
│ ├── risk.py # Risk management and limits
│ ├── portfolio.py # Portfolio tracking and P&L
│ ├── backtest.py # Backtesting engine
│ └── storage.py # Data storage (Parquet + SQLite)
├── api/
│ └── server.py # FastAPI REST + WebSocket API
├── ui/
│ └── dashboard.py # Streamlit monitoring dashboard
├── config/
│ └── settings.py # Configuration management
└── tests/ # Unit and integration tests
Quick Start
- Install Dependencies:
pip install -r requirements.txt
2. Configure Environment
cp .env.example .env
# Edit .env with your API keys and settings
3. Run Market Data Feed
python -m arbi.core.data_feed
4. Start API Server
python -m arbi.api.server
5. Launch Dashboard
streamlit run arbi/ui/dashboard.py
Configuration
All configuration is managed through environment variables and arbi/config/settings.py:
- API Keys: Exchange API credentials
- Risk Limits: Position sizes, daily loss limits
- Strategy Parameters: Signal thresholds, execution delays
- Monitoring: Slack/Telegram webhooks
Development
Running Tests
pytest tests/ -v --cov=arbi
Code Quality
black arbi/
flake8 arbi/
mypy arbi/
Docker Deployment
docker-compose up -d
License
MIT License - see LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file trading_bot_ml-1.0.0.tar.gz.
File metadata
- Download URL: trading_bot_ml-1.0.0.tar.gz
- Upload date:
- Size: 193.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf53278e1ca9d05a2d5df33aa1a6ccf56738040bc34dbbcb53d5fc62615a34ff
|
|
| MD5 |
e27008e764b98089a1ac9a01c46d5ff1
|
|
| BLAKE2b-256 |
78b7d53c14bc7507c179e22edaad5905c7038e41d9af05f33acb26971d61c53e
|
File details
Details for the file trading_bot_ml-1.0.0-py3-none-any.whl.
File metadata
- Download URL: trading_bot_ml-1.0.0-py3-none-any.whl
- Upload date:
- Size: 149.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e8c772a049ec30ae6c0de1ea0f4a7a8d547a8ea5bee041dc1542d7ec6b708a2
|
|
| MD5 |
e7d56945e72d688a451df7b417760d60
|
|
| BLAKE2b-256 |
cc9bd74c2a0569e2d59982d33d8a1e79163521ae3b92d5ca24ae430f22460e90
|