Back to projects
Trading··Research → Paper → Live

QuantLab — Unified OKX Spot Quantitative Research & Execution Platform

Research-to-execution infrastructure for OKX v5 spot markets: shared Decimal domain models across backtesting, decoupled paper-trading daemon, and pre-trade risk execution.

PythonOKX v5 REST/WSDecimalSQLiteTOMLuvWeb UI

Overview

QuantLab Unified Core & Decoupled Paper-Trading Daemon

Built to eliminate strategy drift between notebooks and live trading scripts, QuantLab provides a single Python codebase covering market data ingestion, historical simulation, long-running paper trading on OKX Demo, and guarded live execution.

Architecture

  • Shared Strategy & Domain Core: strategies/ and domain.py power both historical matching and live/demo execution.
  • Decimal Precision Everywhere: Prices, sizes, fees, and balances strictly use Decimal to prevent floating-point drift.
  • Staged Rollout & Pre-Trade Risk: Progresses through backtest.toml → demo.toml → live.toml (disabled by default) with order state-machine reconciliation and strict .env secret isolation.
  • Decoupled Paper-Trading Daemon: The trading runtime runs as an independent local service with SQLite order persistence, so iterating on or restarting the web UI never interrupts active strategy instances.