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.
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)
Run focused tests and validators for ordinary changes. Full regression is a durable milestone closeout, public/release-candidate handoff, deployment approval/closeout, release-hardening closeout, Admin API/backend association closeout, or explicit user request gate. See Regression Process for the durable policy.
Use the process-parallel runner for that closeout gate:
python tools\run_parallel_regression.py --workers 4Sequential pytest is a fallback only when the runner cannot be used:
pytest tests/regression/ -v --tb=short