PROJECT GUIDE / NOVEMBER 16, 2026

CoinSwitch
Scalping Lab

A local crypto trading research app. Replay market events, simulate orders, inspect costs and recover the ledger after a restart.

Local replay and PAPER implemented. Live trading readiness remains unverified.

START HERE / 1 MINUTE

What it does today

Run an experiment

Use a synthetic replay without exchange or AI credentials. Step or run it, pause new entries and inspect orders, fills, fees and audit records.

Inspect the result

A React dashboard reads an authenticated local Python service. SQLite preserves exact decimal accounting, experiment history and state for recovery.

Know the boundary

PAPER simulates execution, including explicitly configured read-only market polling. Profitability and actual live-account behavior have not been established.

CHOOSE YOUR DEPTH

The quickest reading path

  1. 1 minute — understand the project.Read the overview above and readiness below. Both are public.
  2. 5 minutes — follow the architecture.Read the flow, boundaries and decisions, then the assessment and verification checkpoint.
  3. Run it — use the private source.Start with current progress and local setup. These links require repository access.
Go deeper: source documents and research

Application links point to feat/local-trading-platform, the implementation branch; it has not merged into main. The full source and research repository remains private.

ARCHITECTURE / FOLLOW THE STATE

One local application, one execution owner

A modular Python backend owns strategy decisions, risk checks and execution state. The dashboard requests actions and displays persisted results. The diagram follows the local replay/PAPER path.

  1. Market inputSynthetic replay or explicitly configured read-only feed
  2. StrategyDeterministic signal or an explicit decision to abstain
  3. Risk gateCash, inventory, costs, limits and data health
  4. Durable intentRecord the decision before execution
  5. Paper brokerSimulated orders, fills and fees
  6. Ledger + UISQLite records, recovery and dashboard snapshots

API and dashboard

FastAPI/Uvicorn binds to loopback. An operator token authenticates local access. React/TypeScript displays mode, cash, inventory, fees and pending outcomes; operational state is enforced by the backend.

Execution and recovery

One execution owner maintains durable order state and prevents duplicate writers. SQLite stores orders, fills, costs and audit history. Restarts recover persisted state; unresolved outcomes block additional exposure.

Controls with distinct meanings

Pause stops new entries. Cancel concerns an outstanding order. Exit queues an order to reduce inventory, and a replay fill needs a subsequent event. Stopping a process or archiving an experiment never invents a liquidation.

Optional AI advisory

Bounded Responses explanations consume recorded evidence outside the trading path, with a zero-by-default request budget. AI has no exchange tools or risk overrides. Replay and paper operation need no provider key.

Why these choices

ChoicePurpose and boundary
Python + FastAPIKeep deterministic strategy, risk and accounting logic together behind one local API.
SQLite + exact decimalsKeep a durable local ledger with explicit costs and consistent backups; no external database service is needed for the local milestone.
React + TypeScriptProvide interactive experiment controls and visible state without a second application backend.
Separate live gateA guarded programmatic CoinSwitch path exists. The dashboard does not enable live trading; account-specific contracts and fees still require verification.
Bounded AI; no vector databaseExplanations remain optional. The initial workflow has no need for autonomous trading agents or semantic retrieval infrastructure.

READINESS / ENGINEERING EVIDENCE

What the checks establish

Local replay/PAPER: implemented

Offline backend, interface, accounting and recovery checks are recorded in the assessment report, with source revisions and CI evidence. Those checks validate application behavior under the tested conditions.

Live funds: not ready

Real account permissions, fees, order contracts, partial fills, cancellation races, uncertain outcomes and monitored recovery need credential-backed validation. No strategy profitability or extraordinary return claim has been established.

The installed optional AI constructor passed without network calls. Paid provider calls, credential-backed exchange checks and cloud hosting remain unverified. Replay needs no provider key.

Development rules