// case_study/smtbot.md

SMTbot showcase.

Private trading system. Public engineering showcase. The page shows architecture, risk controls, journal/dashboard layers, and validation without exposing the decision core.

Bybit V5-native · 10 symbols x 4 TFs · ~975 pytest cases
01 · Architecture

End-to-end trading loop, shown at system level.

Read the flow as Bybit V5 API, data preparation, private decision boundary, risk authority, execution, and operations.

02 · Public/Private Boundary

Open enough to evaluate the engineering. Closed enough to protect the strategy.

The showcase explains system quality, not trading decision logic, production parameters, or internal reports.

Visible in showcase
  • System architecture and module map
  • Runtime model and technology footprint
  • Risk controls, ops workflow, dashboard, and journal structure
Kept in private repo
  • Decision core implementation
  • Production parameters and internal ranking logic
  • Account records and private performance reports
03 · Capability Map

The visible technical surface is grouped by responsibility.

The exposed layers represent data, risk, execution, journal, dashboard, and test discipline without revealing strategy logic.

Data Plane
  • Bybit V5 WS closed-candle stream and market feed
  • KlineBuffer + cache rolling windows and reconnect recovery
  • MarketStateBuilder normalized state from raw exchange rows
Risk & Portfolio
  • RR system standardized reward/risk calculation
  • Position sizing equity and exposure-aware sizing
  • Circuit breakers loss, streak, drawdown, and cooldown gates
Execution
  • pybit V5 client order, position, wallet, and fill access
  • Order router single controlled order gateway
  • Position monitor reconciliation against exchange state
Ops & Validation
  • aiosqlite journal persistent records for runtime events
  • FastAPI + uvicorn read-only operations dashboard
  • pytest 63 files, roughly 975 test cases
04 · Engineering Proof

The proof is visible operating quality, not exposed strategy detail.

API-owned data path

Market ingestion and state preparation are owned directly through exchange APIs.

Risk gate before orders

RR, sizing, exposure, and cooldown checks run before order routing.

Inspectable ops memory

SQLite records and dashboard views keep actions, reconciliation, and reports auditable.

Test-guarded surface

63 test files cover runtime, risk, execution, and operations flows.

05 · Workflow

Controlled demo path from connection to observation.

The workflow validates API access first, then moves through configuration, connection checks, dry-run, and dashboard monitoring.

01BYBIT API 02config + env 03connection check 04dry-run pass 05dashboard watch