
Building an automated market-making strategy with real-time execution and risk management
About The Project
The project focused on developing an automated trading platform capable of executing a market-making style strategy across selected equity markets. The system continuously places buy orders at predefined intervals below a target price and automatically creates corresponding sell orders when positions are filled.
The platform was designed to eliminate manual trade execution, maintain consistent strategy adherence, and provide traders with configurable controls for position sizing, interval management, stock selection, and execution parameters. The initial implementation prioritized paper trading, broker integration, trade monitoring, and resilient recovery mechanisms before transitioning to live execution.

System Architecture
System Architecture diagram
Key Challenges
Managing market gap openings
One of the most significant challenges involved gap-up and gap-down openings where market prices move significantly before trading begins. These movements can cause the strategy to miss intended buy or sell levels, requiring intelligent rebalancing and order adjustments.
Maintaining continuous order synchronization
The system needed to continuously track open orders, filled orders, cancellations, and market conditions in real time. Any mismatch between the platform and broker state could result in unintended trades or missed opportunities.
Recovering from outages and system failures
Trading systems must remain reliable even when application crashes, exchange disruptions, or infrastructure outages occur. Preserving order history and position data was essential for accurate recovery and strategy continuity.
Executing trades with strict order constraints
The strategy required precise execution controls to avoid partial fills and after-hours trading activity. Ensuring compliance with these requirements while maintaining execution efficiency introduced additional complexity.
Building a configurable strategy framework
The platform needed to support configurable intervals, position sizing, stock selection, order amounts, and strategy parameters while maintaining stability across different trading conditions.
Our Solution
Automated order ladder management
The platform automatically generated and managed order ladders based on configurable intervals. Whenever a buy order was filled, the system immediately created the corresponding sell order at the predefined profit target level.
Real-time broker integration layer
A dedicated integration layer was designed to interact with broker APIs for placing orders, monitoring executions, retrieving account information, and managing cancellations. This enabled seamless communication between trading logic and market execution venues.
Persistent trade and order database
A centralized database was implemented to store order history, active positions, execution records, and trading activity. This allowed the platform to recover accurately following interruptions while maintaining a complete audit trail.
Intelligent market gap handling
Custom logic was introduced to identify missed orders caused by gap-up and gap-down market openings. The system recalculated trading positions and adjusted order placement strategies to maintain consistency with the intended trading model.
Configurable execution and risk controls
The platform incorporated configurable strategy parameters, execution constraints, and future-ready kill-switch mechanisms to support both experimentation and production-grade trading environments.
The Result
Automated trade execution
The platform transformed a manually managed trading methodology into a fully automated execution system capable of continuously operating throughout market hours.
Improved execution consistency
Automated order generation and management reduced emotional decision-making and guaranteed consistent application of the trading strategy across all market conditions.
Increased operational resilience
The persistence and recovery architecture ensured that trading activity, positions, and order states could be restored quickly following outages or application failures.
Created a scalable foundation for live trading
The modular architecture, broker integrations, monitoring systems, and configurable execution framework provided a strong foundation for future live trading operations and strategy expansion.
Need a similar solution?
Talk with our team about your project goals and timeline.