An asynchronous, event-driven framework designed to bridge the gap between Large Language Model reasoning and professional market execution. It provides hardened infrastructure—WebSocket management, order lifecycle persistence, and multi-stage risk validation—allowing developers to focus entirely on the strategy layer.
Built on an Async Event Bus architecture. All components are decoupled nodes that communicate via typed, immutable events, ensuring non-blocking execution and high throughput.
| Component | Responsibility |
|---|---|
| Market Data | Real-time Coinbase WebSocket (Ticker Channel) persistence. |
| Order Manager | Full lifecycle tracking with fee accounting and 5-stage fill verification. |
| Position Tracker | Real-time realized P&L and daily summaries via SQLite. |
| Strategy Select | Dynamic switching between PriceOnly and News-Aware (Grok + Claude) modes. |
The system treats trading as a multi-modal cognitive process rather than a set of rigid indicators.
PriceBuffer for technical analysis snapshots.Defense is the only way to survive. A three-stage validation pipeline functions as a persistent circuit breaker.
MAX_ORDER_SIZE_USD limits per transaction.
MAX_DAILY_LOSS_USD.
The included Next.js Dashboard provides institutional-level visibility.
# Clone and install in editable mode
git clone <repo-url> coinbase_trading_bot
cd coinbase_trading_bot
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
# Configure environment
cp .env.example .env
# Verify plumbing with the Interactive Smoke Test
python scripts/smoke_test.py
80+ unit and integration tests using mocked Coinbase responses.
pytest --cov=src
smoke_test.py script and paper trading before deploying capital.