This repository contains the Coinbase Advanced Trading engine, which provides functionality for managing stealth orders, fills, and lifecycle control for trading on Coinbase Advanced Trade.
- Multithreaded Coinbase Advanced Trade automation.
- Spot and Coinbase Derivatives product support through one shared order path.
- Stealth order lifecycle, reveal, repricing, cancel/re-entry, and fill reconciliation.
- Browser and terminal dashboard surfaces.
- A self-contained portfolio site: Netflix AI Engineer Workbench.
The checked-in products.json is a minimal local catalog, not the full
Coinbase spot universe. Direct dashboard and stealth order entry use configured
products from that catalog. USDC portfolio sweep and campaign workflows fetch
eligible Coinbase BASE-USDC spot products dynamically and have their own
dry-run, cap, approval, retry, audit, and P/L surfaces.
For the ordered documentation index, start at docs/README.md. For spot setup notes, see README.spot-trading.md. For USDC-only spot portfolio sweep planning, see README.spot-portfolio-sweep.md. For account-level stealth planning/reveal guards, see README.action-condition-guards.md. For the enterprise admin API boundary, see README.admin-api.md. For backend maintainer handoff, see docs/MAINTAINER_HANDOFF.md.
To set up the environment, install the package in development mode:
py -3.13 -m pip install -e .The engine uses the following environment variables:
COINBASE_API_KEY- Coinbase API key for authenticationCOINBASE_API_SECRET- Coinbase API secret for authenticationCOINBASE_USE_SANDBOX- Set to "true" to use Coinbase sandbox environment
The trading engine runs with the following components:
- WebSocket server:
ws://localhost:8765 - Main entry point:
main.py - Dashboard UI:
ui_stealth_orders_manager.html
This project is tested on:
- Windows 11 + VS Code
- Python 3.13
- Coinbase Advanced Trade API (REST + WebSocket)
To run tests:
pytest tests/regression/ -v --tb=short