Skip to main content

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

  1. 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.

Metadata

Release files for trading-bot-ml 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for trading-bot-ml 1.0.0
File Size Uploaded
trading_bot_ml-1.0.0.tar.gz 193.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for trading-bot-ml 1.0.0
File Interpreter ABI Platform
trading_bot_ml-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 342.8 kB

Release files / trading_bot_ml-1.0.0.tar.gz

Download URL trading_bot_ml-1.0.0.tar.gz
Size 193.5 kB
Tags Source
SHA-256 checksum
How to use checksums
bf53278e1ca9d05a2d5df33aa1a6ccf56738040bc34dbbcb53d5fc62615a34ff
BLAKE2b-256 checksum
How to use checksums
78b7d53c14bc7507c179e22edaad5905c7038e41d9af05f33acb26971d61c53e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release files / trading_bot_ml-1.0.0-py3-none-any.whl

Download URL trading_bot_ml-1.0.0-py3-none-any.whl
Size 149.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e8c772a049ec30ae6c0de1ea0f4a7a8d547a8ea5bee041dc1542d7ec6b708a2
BLAKE2b-256 checksum
How to use checksums
cc9bd74c2a0569e2d59982d33d8a1e79163521ae3b92d5ca24ae430f22460e90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.1

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page