Skip to content
Std07-1Public

About

Real-time Smart Money Concepts (SMC) trading platform: FXCM/Binance → UnifiedDataStore → live WebSocket charts, paired with an autonomous Claude trading agent.

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Latest commit

 

History

1,018 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trading Platform v3 (FXCM Connector + UDS + UI)

CI License: MIT Python

AI·ONE v3 — live XAU/USD M15 chart with SMC markup (FVG, BOS, CHoCH, EQH, premium/discount); the annotation card is an external client's thesis delivered through the read-only API

Real-time Smart Money Concepts (SMC) analytics for gold, indices and crypto — a broker-grade data pipeline (FXCM / Binance) feeding a live WebSocket chart, with a read-only HTTP/WS API that any external client — a dashboard, a research notebook, or an AI agent — can connect to and read.

▶ Live: aione-smc.com

What it is

  • A trading platform, not a bot. It ingests broker data, keeps a single source of truth, computes SMC structure and serves a live chart. It never places orders and never fabricates signals. External clients — including AI agents — connect to it and read (ADR-0058, ADR-0090); their reasoning is not part of the platform.
  • Hard data invariants — a single UnifiedDataStore write-center, Final > Preview, degraded-but-loud (no silent fallbacks). Every non-trivial decision is captured in 90+ ADRs.
  • $0 analytics — SMC structure (BOS / CHoCH), order blocks, FVG, liquidity, premium/discount and confluence scoring are computed in-process — no paid signal feeds.
  • Built like production — dual-venv broker isolation, exit-gates, security scan, green CI, and a real FXCM real-time stream. Maturity is tracked honestly (M3 → M7), not faked.

⚠️ Not financial advice. Analytical / research tool only — SMC labels are technical markers, not signals. Trading carries substantial risk of loss. Full terms: DISCLAIMER.md · LICENSE.


English · Українська

A "data → analytics/SMC → UI → trading interaction" platform built on hard invariants, with the UnifiedDataStore (UDS) as the single write-center.

External clients

The platform is client-agnostic: anything that speaks HTTP or WebSocket can read it.

  • Read-only public API (ADR-0058) — five GET /api/v3/* endpoints behind an API key: bars, SMC snapshot, status. Rate-limited, no write path.
  • Live WebSocket — the same full / delta frames the chart renders, for any same-origin consumer.
  • Optional agent bridge (ADR-0090) — a separate, off-by-default process for a connected AI agent (wake conditions, thesis overlay). It runs beside the platform, not inside it, and the platform does not depend on it.

One such client is an autonomous trading agent kept in its own repository (Std07-1/smc-trader-v3). Its rules, personality and decisions live there; this repository documents only the read-only surface it consumes. Neither side hands trading decisions to the other: the platform never fabricates signals, and no client can steer what the chart shows.

Architecture: A → C → B

Layer What Where
A Broker + ingest FXCM/Binance history + tick stream → writer processes runtime/ingest/, app/
C UDS SSOT disk + Redis cache + updates bus runtime/store/uds.py
B UI (ws) read-only WS real-time renderer, same-origin, port 8000 ui_v4/ + runtime/ws/ws_server.py
TUI aione-top: interactive TUI monitor for processes/pipeline aione_top/

Core principles

  • SSOT: one UDS, one config.json, one TF allowlist.
  • NoMix / Final > Preview: complete=true always wins; two different final sources for one key are forbidden.
  • Degraded-but-loud: no silent fallbacks — only warnings[] / meta.degraded[].
  • Disk hot-path ban: disk only for bootstrap/scrollback/recovery; interactive = RAM/Redis. Scrollback: max_steps=6, cooldown 0.5s.
  • Time geometry (dual convention): CandleBar/SSOT/API = end-exclusive (close_time_ms = open + tf_s*1000); Redis ALL = end-inclusive (close_ms = open + tf_s*1000 - 1). Conversion happens only at the Redis write boundary.

Quickstart

1. Installation

# Main venv (Python >=3.11) — platform, UDS, derive, SMC, UI
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

# Broker venv (Python 3.7) — forexconnect SDK (.venv37/)
C:\Python37\python.exe -m venv .venv37
.venv37\Scripts\pip install -r requirements-broker.txt

# UI v4 frontend (Svelte 5 + Vite)
cd ui_v4
npm install
npm run build
cd ..

# Secrets
cp .env.example .env   # edit FXCM_USER / FXCM_PASS / FXCM_URL

2. Run

The platform is 6 independent processes. Each starts separately — so you can restart the UI (ws_server) in 3 seconds without stopping the data pipeline.

Process --mode What it does
M1 poller m1_poller broker_sidecar + m1_ingestion + derive cascade
Broker sidecar broker_sidecar FXCM M1 fetch + tick relay V2 (.venv37/)
Tick preview tick_preview ticks → preview bars
Binance ingest binance_ingest_worker BTCUSDT/ETHUSDT M1 + backfill
Binance ticks binance_tick_publisher Binance live ticks → Redis
WS server ws_server UI backend, port 8000
# Each in its own terminal:
python -m app.main --mode <mode> --stdio pipe

# Or all together (legacy, NOT recommended for dev):
python -m app.main --mode all --stdio pipe

Full cheat-sheet with every command (local + VPS): docs/runbooks/commands.md

Dual-venv (ADR-0016): the supervisor automatically uses .venv37/ for broker_sidecar (M1 fetch + tick relay V2) and .venv/ for everything else. tick_publisher_fxcm is permanently stopped (FXCM dual-session conflict). Per-mode PID locks: logs/supervisor_{mode}.pid — allow parallel startup.

Quality gates

python -m tools.run_exit_gates --manifest tools/exit_gates/manifest.json

If gates FAIL → a formal NO-GO until the next PATCH.

Automation baseline

  • GitHub Actions: Python smoke tests + UI v4 typecheck/build on every push and pull request
  • Dependabot: weekly dependency updates for pip and npm
  • Goal: close a baseline enforcement loop for governance, SSOT smoke, and frontend compile health

Documentation (SSOT)

Full documentation: docs/index.md — single entry point.

Document Description
docs/index.md Navigation across all documentation
docs/system_current_overview.md Architecture, processes, diagrams, invariants
docs/contracts.md Contract registry (bar_v1, window_v1, updates_v1, tick_v1)
docs/ui_api.md HTTP API reference (endpoints, guards, TTL)
docs/config_reference.md config.json field reference
docs/runbooks/production.md Production runbook (startup, incidents, recovery)
docs/adr/index.md Registry of all ADRs (canonical archive)
docs/adr/0001-unified-data-store.md ADR: UDS as the single waist
docs/adr/0002-derive-chain-from-m1.md ADR: DeriveChain M1→M3→M5→H4 (Phase 0 complete)
docs/adr/0003-cold-start-hardening.md ADR: Cold start hardening (S1 ✅, S2 ✅, S3-S4 pending)
┌─────────────────────────────────────────────────────────────┐
│  LAYER 1: INGEST (simple, focused, single-responsibility)   │
│                                                             │
│  ┌──────────────┐    ┌──────────────────┐                   │
│  │ m1_ingestion │    │ binance_ingest   │                   │
│  │ M1 from FXCM │    │ Binance (off)    │                   │
│  └──────┬───────┘    └──────┬───────────┘                   │
│         │ commit M1         │ commit M1                     │
│         ▼                   ▼                               │
│  ┌──────────────────────────────────┐                       │
│  │            UDS (SSOT)            │                       │
│  └──────────────┬───────────────────┘                       │
│                 │ updates bus (Redis pub/sub)               │
└─────────────────┼───────────────────────────────────────────┘
                  │
                  ▼
┌─────────────────────────────────────────────────────────────┐
│  LAYER 2: DERIVE ENGINE (cascade, async, priority)          │
│                                                             │
│  ┌─────────────────────────────────────────────────┐        │
│  │          core/derive.py (PURE, no I/O)          │        │
│  │  GenericBuffer(tf_s)  +  aggregate_bars()       │        │
│  │  DERIVE_CHAIN = declarative cascade rules       │        │
│  └─────────────────────────────────────────────────┘        │
│                                                             │
│  ┌─────────────────────────────────────────────────┐        │
│  │    runtime/ingest/derive_engine.py (I/O layer)  │        │
│  │                                                 │        │
│  │  On new M1 bar →  cascade per symbol:           │        │
│  │    M1 → M3 (3×M1)                               │        │
│  │    M1 → M5 (5×M1)                               │        │
│  │      M5 → M15 (3×M5)                            │        │
│  │        M15 → M30 (2×M15)                        │        │
│  │          M30 → H1 (2×M30)                       │        │
│  │            H1 → H4 (4×H1, session anchor)       │        │
│  │    M1 → D1 (live; 17:00 New York; settle)       │        │
│  │                                                 │        │
│  │  8 symbols (metals, indices, USD/JPY)           │        │
│  │  Priority: watched symbol → front of queue      │        │
│  │  Buffers: GenericBuffer per (symbol, tf_s)      │        │
│  └─────────────────────────────────────────────────┘        │
│         │                                                   │
│         ▼ commit derived bars                               │
│  ┌──────────────────────────────────┐                       │
│  │            UDS (SSOT)            │                       │
│  └──────────────────────────────────┘                       │
└─────────────────────────────────────────────────────────────┘
                  │
                  ▼
┌──────────────────────────────────────────────────────────────┐
│  LAYER 3: UI v4 (WS real-time, read-only, ZERO domain logic) │
│  WS full/delta/scrollback → UDS via ws_server.py             │
│  Svelte 5 + LWC 5 + TypeScript, ~80 files ~22000 LOC         │
│  Drawing: 6 tools, PC panel + phone (ADR-0111, 0112)         │
│  Port 8000, same-origin, config-gated                        │
│  Chart parity DONE, audit T1-T10 COMPLETE                    │
└──────────────────────────────────────────────────────────────┘

Project history

In active development since 14 October 2024 — it began as the AiOne-t crypto screener, evolved through SMC analytics engines (AiOne_t v2/v3, smc_v1) and FXCM connectors, and became this real-time platform. Its first external AI client was connected on 30 March 2026 (kept in a separate repository).

Contact

Channel (SMC market commentary): @smc_v3 · GitHub: @Std07-1

License

See LICENSE (MIT).

Third-party dependencies

A list of third-party dependencies and their licenses: THIRD_PARTY_NOTICES.md

FXCM ForexConnect SDK: this repository does NOT contain or distribute the ForexConnect SDK. To use the SDK, each user must accept the FXCM EULA themselves and hold an active FXCM account. Details: docs/compliance/fxcm-sdk-license-review.md

About

Real-time Smart Money Concepts (SMC) trading platform: FXCM/Binance → UnifiedDataStore → live WebSocket charts, paired with an autonomous Claude trading agent.

Topics

Resources

Contributing

Security policy

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages