About the Project
A full-stack gold futures trading system built for real financial operations. The platform covers the complete trading chain — live quotes, order placement, position management, and daily settlement — implemented to the strict standards of real financial workflows, including trade sequencing, margin freezing, and risk-control rules. The system ships with a standalone trading front end designed for live operations, client demos, staff training, and new-product validation, significantly reducing the cost of trial runs before going to market.
Core Features
- Live Quotes: Real-time price feed, candlestick charts, historical data replay
- Trading Engine: Market and limit orders, position management, automatic take-profit and stop-loss
- Settlement System: Daily end-of-day clearing, P&L calculation, fund account reconciliation
- Risk Control: Margin management, liquidation warnings, risk-tier controls
- Admin Console: User account management, trade audit log, business parameter configuration
- Trading Front End: Standalone UI that serves live operations, client demos, and staff training simultaneously
Tech Stack
Vue / React Python FastAPI PostgreSQL Redis WebSocket Market Data Feed
Engineering Highlights
1. Strict Trade Sequencing Place order → freeze margin → match → fill → release freeze → update position → settle P&L. Each step is a non-skippable state transition. PostgreSQL transactions enforce atomicity, eliminating edge cases like "filled but margin not frozen."
2. Tiered Quote Distribution via WebSocket Market data from the feed is aggregated on the backend and pushed to clients based on their subscription profile. Active users receive millisecond-level updates; idle users get throttled pushes, preventing any single client from consuming disproportionate bandwidth.
3. Margin and Liquidation Warning
Available margin is evaluated in real time as balance − frozen − floating loss. Crossing the warning threshold triggers a liquidation alert; reaching the force-liquidation level initiates the forced-close pipeline. All actions carry a complete audit log.
4. Settlement Decoupled from Live Trading End-of-day settlement runs as an independent task and does not touch the live trading pipeline. After settlement completes, a data snapshot is persisted — admins can replay any historical date's account state and positions.
Deliverables
- Five complete modules: live quotes, trading, settlement, risk control, and audit
- A standalone trading front end that handles live operations, client demos, and staff training in one interface
- Delivered to financial-industry standards, supporting stable mid-to-long-term operations




