All work
Full-Stack

AstraTrade: White-Label Broker Trading Platform (MT6)

A multi-tenant broker platform with tenant approval, an MT5 bridge, an engine mirror and divergence reporting.

Monorepo with trader and admin web apps, NATS messaging, embedded Postgres, a custom MQL6 indicator runtime that plots on the chart, 114 unit tests, 11 Playwright E2E tests and a verified real demo trade through MT5.

AstraTrade: White-Label Broker Trading Platform (MT6) — illustration
What makes it serious
  • Verified real demo trade through the MT5 bridge
  • Custom MQL6 indicator runtime executes on the chart
  • 114 unit tests + 11 Playwright E2E tests + typecheck + encoding gate
  • Docs-vs-scripts test prevents stale documentation

AstraTrade is the v1 of a white-label trading platform for brokers, built around a specific demo: a tenant is approved, a trade is placed through a live MT5 bridge, an internal engine mirrors it, and a divergence report compares the two. It is a TypeScript monorepo with a trader terminal, an admin app, services connected over NATS and an embedded Postgres for local development.

Money is stored as bigint micros, prices as points and volume in fixed units per lot, so rounding never drifts. Charts use KLineCharts after verifying that the TradingView Charting Library licence excludes white-label use. A custom indicator language runtime (MQL6) actually executes and plots indicators on the chart, with a read-only browser probe used by the end-to-end tests; live EA attachment is deliberately disabled and limited to the tester.

Quality gates are unusually strict for a v1: unit tests, typecheck, an encoding check, a build, and Playwright end-to-end tests that need the message bus and services running. A status document is rewritten each run as the single current truth, and a test fails if the docs mention an npm script that does not exist, added after a broken script shipped once. The MT5 bridge is demo-only by a hard guard, and one real demo trade was verified end to end.

How it works

  1. Admin approves a tenant in the admin app
  2. Trader logs into the terminal and places an order
  3. Bridge executes on MT5 (demo-guarded) and publishes the fill over NATS
  4. Engine mirrors the trade and a divergence report is produced
  5. E2E suite replays the whole loop in Playwright
Stack
TypeScriptNode.jsNATSPostgresKLineChartsPlaywrightMetaTrader 5
#broker#white-label#monorepo#nats#typescript#mt5#trading-platform