You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FTH Trading Broker-Dealer Platform is a fully integrated, SEC/FINRA-compliant institutional trading infrastructure designed for multi-asset class execution, real-time risk management, and automated regulatory reporting. Built on event-driven microservices architecture with sub-millisecond latency paths.
🎯 Core Capabilities
Capability
Status
Description
🟢 Multi-Asset Trading
LIVE
Equities, Options, Fixed Income, Digital Assets
🟢 Order Management
LIVE
FIX 4.4 / FIX 5.0 SP2, Smart Order Routing
🟢 Risk Engine
LIVE
Real-time pre-trade & post-trade risk checks
🟢 Regulatory Reporting
LIVE
FOCUS, CAT, TRACE, OATS, Blue Sheets
🟢 Net Capital (15c3-1)
LIVE
Automated daily computation & alerts
🟢 Customer Protection
LIVE
Reserve formula (15c3-3) computation
🟢 AML/KYC
LIVE
CIP, CDD, EDD, SAR filing, OFAC screening
🟡 Digital Asset Custody
BETA
Fireblocks + BitGo MPC integration
🟡 CCIP Bridge
BETA
Cross-chain settlement via Chainlink CCIP
🔵 AI Trade Surveillance
DEV
ML-based market manipulation detection
Architecture
High-Level System Architecture
graph TB
subgraph Clients["🖥️ Client Layer"]
direction LR
TW["Trading Workstation<br/>React + Electron"]
MP["Management Portal<br/>Next.js"]
API_C["API Consumers<br/>FIX / REST / WS"]
end
subgraph Gateway["🛡️ API Gateway & Security"]
direction LR
AG["API Gateway<br/>Kong + Rate Limiting"]
AUTH["Auth Service<br/>OAuth 2.0 + MFA"]
WAF["WAF<br/>ModSecurity"]
end
subgraph Core["⚡ Core Trading Services"]
direction TB
OMS["Order Management<br/>System (OMS)"]
EMS["Execution Management<br/>System (EMS)"]
SOR["Smart Order<br/>Router (SOR)"]
MM["Market Making<br/>Engine"]
end
subgraph Risk["🔴 Risk & Compliance"]
direction TB
PRE["Pre-Trade<br/>Risk Engine"]
POST["Post-Trade<br/>Risk Engine"]
NC["Net Capital<br/>Engine (15c3-1)"]
CP["Customer Protection<br/>(15c3-3)"]
AML_S["AML/KYC<br/>Engine"]
SURV["Trade<br/>Surveillance"]
end
subgraph Data["📊 Data & Analytics"]
direction TB
MD["Market Data<br/>Feed Handler"]
POS["Position<br/>Management"]
PNL["P&L<br/>Engine"]
RPT["Regulatory<br/>Reporting"]
end
subgraph Infra["🏭 Infrastructure"]
direction LR
MQ["Event Bus<br/>Kafka / NATS"]
DB["Databases<br/>Postgres + TimescaleDB"]
CACHE["Cache Layer<br/>Redis Cluster"]
VAULT["Secret Management<br/>HashiCorp Vault"]
end
subgraph External["🌐 External Connections"]
direction LR
EXCH["Exchanges<br/>NYSE • NASDAQ • CBOE"]
CLR["Clearing Houses<br/>DTCC • OCC • NSCC"]
REG["Regulators<br/>SEC • FINRA • NFA"]
CUST["Custody<br/>Fireblocks • BitGo"]
end
Clients --> Gateway
Gateway --> Core
Core --> Risk
Core --> Data
Risk --> Data
Core --> Infra
Data --> Infra
Risk --> Infra
Core --> External
Data --> External
Loading
System Flow Diagrams
📈 Order Lifecycle Flow
flowchart LR
A["🧑💼 Client<br/>Submits Order"] --> B{"🛡️ Pre-Trade<br/>Risk Check"}
B -->|"✅ PASS"| C["📋 OMS<br/>Order Booked"]
B -->|"❌ FAIL"| Z1["🚫 Rejected<br/>+ Alert"]
C --> D{"🔀 Smart Order<br/>Router"}
D -->|"Best Execution"| E["🏛️ Exchange<br/>Routed"]
D -->|"Internal Cross"| F["↔️ Internal<br/>Matching"]
E --> G{"📡 Execution<br/>Report"}
F --> G
G -->|"FILLED"| H["✅ Post-Trade<br/>Processing"]
G -->|"PARTIAL"| I["⏳ Partial Fill<br/>Requeue"]
G -->|"REJECTED"| Z2["🚫 Exchange<br/>Reject"]
H --> J["📊 Position<br/>Update"]
H --> K["💰 P&L<br/>Calculation"]
H --> L["📝 Regulatory<br/>Reporting"]
H --> M["🏦 Settlement<br/>Instruction"]
I --> D
style A fill:#4A90D9,stroke:#2C5F8A,color:#FFFFFF
style B fill:#F5A623,stroke:#D4891A,color:#FFFFFF
style C fill:#50C878,stroke:#3DA65E,color:#FFFFFF
style D fill:#9B59B6,stroke:#7D3C98,color:#FFFFFF
style E fill:#3498DB,stroke:#2980B9,color:#FFFFFF
style F fill:#3498DB,stroke:#2980B9,color:#FFFFFF
style G fill:#F5A623,stroke:#D4891A,color:#FFFFFF
style H fill:#50C878,stroke:#3DA65E,color:#FFFFFF
style J fill:#1ABC9C,stroke:#16A085,color:#FFFFFF
style K fill:#1ABC9C,stroke:#16A085,color:#FFFFFF
style L fill:#1ABC9C,stroke:#16A085,color:#FFFFFF
style M fill:#1ABC9C,stroke:#16A085,color:#FFFFFF
style Z1 fill:#E74C3C,stroke:#C0392B,color:#FFFFFF
style Z2 fill:#E74C3C,stroke:#C0392B,color:#FFFFFF
style I fill:#F39C12,stroke:#D68910,color:#FFFFFF
flowchart LR
A["📄 Application<br/>Received"] --> B["🆔 CIP<br/>Identity Verification"]
B --> C{"OFAC / PEP<br/>Screening"}
C -->|"🔴 HIT"| D["🔍 Enhanced Due<br/>Diligence (EDD)"]
C -->|"🟢 CLEAR"| E["📊 Risk<br/>Assessment"]
D --> F{"Manual<br/>Review"}
F -->|"APPROVED"| E
F -->|"DECLINED"| Z["🚫 Account<br/>Denied + SAR"]
E --> G{"Risk<br/>Rating"}
G -->|"LOW"| H["✅ Standard<br/>Onboarding"]
G -->|"MEDIUM"| I["⚠️ Enhanced<br/>Monitoring"]
G -->|"HIGH"| J["🔴 Senior<br/>Review Required"]
H --> K["🎉 Account<br/>Activated"]
I --> K
J -->|"APPROVED"| K
J -->|"DECLINED"| Z
style A fill:#3498DB,stroke:#2980B9,color:#FFFFFF
style B fill:#3498DB,stroke:#2980B9,color:#FFFFFF
style C fill:#F5A623,stroke:#D4891A,color:#FFFFFF
style D fill:#E74C3C,stroke:#C0392B,color:#FFFFFF
style E fill:#9B59B6,stroke:#7D3C98,color:#FFFFFF
style G fill:#F5A623,stroke:#D4891A,color:#FFFFFF
style H fill:#2ECC71,stroke:#27AE60,color:#FFFFFF
style I fill:#F39C12,stroke:#D68910,color:#FFFFFF
style J fill:#E74C3C,stroke:#C0392B,color:#FFFFFF
style K fill:#2ECC71,stroke:#27AE60,color:#FFFFFF
style Z fill:#E74C3C,stroke:#C0392B,color:#FFFFFF
flowchart LR
A["Position<br/>Portfolio"] --> B["Strategy-Based<br/>Margin (TIMS)"]
A --> C["Portfolio Margin<br/>(OCC STANS)"]
A --> D["Reg T<br/>Initial Margin"]
B --> E{"Lowest<br/>Requirement"}
C --> E
D --> E
E --> F["Applied<br/>Margin Rate"]
F --> G["Margin Call<br/>If Deficient"]
style E fill:#F5A623,stroke:#D4891A,color:#FFFFFF
style G fill:#E74C3C,stroke:#C0392B,color:#FFFFFF
# Clone the repository
git clone https://github.com/FTHTrading/Broker-Dealer.git
cd Broker-Dealer
# Install dependencies
pnpm install
# Copy environment configuration
cp .env.example .env.local
# Start infrastructure (Postgres, Redis, Kafka)
docker compose up -d
# Run database migrations
pnpm db:migrate
# Start all services in development mode
pnpm dev
# Run the test suite
pnpm test
Environment Setup
# Required environment variables (see .env.example for full list)
DATABASE_URL=postgresql://user:pass@localhost:5432/broker_dealer
REDIS_URL=redis://localhost:6379
KAFKA_BROKERS=localhost:9092
FIX_TARGET_COMP_ID=NYSE
VAULT_ADDR=http://localhost:8200