IMockMarket
A comprehensive stock market simulator that allows users to learn trading basics using real-world market data without financial risk.

01. The Problem
Entering the stock market as a beginner is daunting and risky. Real-money trading platforms often lack simplified, risk-free educational environments that use actual, live-updating market data, leading to costly 'learning by doing' mistakes.
02. The Logic
Real-time market data synchronization via WebSockets for up-to-the-minute price accuracy.
Automated daily price history updates using APScheduler and cron triggers to maintain historical charts.
Secure JWT-based authentication with high-security token revocation mechanisms.
Complex portfolio calculation logic that aggregates buy/sell transactions to determine net quantity, average buy price, and real-time profit/loss percentages.
03. The Stack
04. The Solution
Implementation Result
IMockMarket provides a high-fidelity, full-stack trading simulation. It combines a responsive React frontend with a robust Flask API and PostgreSQL database. Users can search for stocks, view historical performance charts, manage a virtual wallet, and execute trades in a sandbox environment that mirrors real market movements.
Key Outcomes
- 01.Successfully simulated over 49 global stock symbols with real-time tracking.
- 02.Implemented a resilient backend architecture capable of 24/7 automated data seeding and history updates.
- 03.Achieved sub-second WebSocket communication for live price feeds.
Reflection
- Mastered the integration of asynchronous background tasks in Flask for data consistency.
- Gained deep experience in managing complex financial state and transactional logic in a relational database.
- Learned to handle real-time data streams and visualization in React using Chart.js.