Overview

A multi-user algorithmic trading platform designed to execute automated trading strategies across multiple markets with strict time, concurrency, and reliability constraints.

The system was built to handle simultaneous user logins, real-time market data, and automated trade execution with minimal latency during live market hours.


Problem Statement

Manual trading and semi-automated setups fail under:

  • Market open load (9:15 AM NSE spike)
  • Concurrent user execution
  • Strategy timing precision
  • Operational reliability

The goal was to build a server-side automated trading system that:

  • Logs in multiple users programmatically
  • Executes strategies in parallel
  • Minimizes human intervention
  • Handles failures gracefully during live markets

Architecture & Design

  • Backend Core: Python-based orchestration layer
  • API Layer: FastAPI for internal services and control endpoints
  • Concurrency Model:
    • Multithreading for I/O-bound broker calls
    • Multiprocessing for CPU-heavy strategy evaluation
  • Market Data:
    • Amibroker integration for charting and signal generation
  • Execution Layer:
    • Broker API integrations (Kotak Neo, Binance, MT5)
  • Frontend:
    • Lightweight React dashboard for monitoring and control
  • Communication:
    • WebSockets for live updates and bot state visibility

Key Features

  • Market Open Automation

    • System auto-starts at market open (9:15 AM)
    • Performs parallel login for all configured users
    • Activates strategy execution pipelines
  • Multi-Broker Strategy Support

    • NSE Options (Kotak Neo)
    • Crypto Trading (Binance)
    • Forex Trading (MT5)
  • Concurrent Trade Execution

    • Parallel order placement per user
    • Isolated execution contexts to prevent cross-user interference
  • Risk & Loss Control

    • Strategy-based exit conditions
    • Automated stop mechanisms to minimize drawdowns

Engineering Challenges Solved

  • Handling race conditions during simultaneous order placement
  • Managing shared vs isolated memory between concurrent tasks
  • Ensuring broker API reliability under burst traffic
  • Synchronizing strategy signals with execution timing
  • Preventing cascading failures during partial outages

Technologies & Concepts

  • Python (core orchestration)
  • FastAPI (internal APIs)
  • AsyncIO, Multithreading, Multiprocessing
  • WebSockets (real-time updates)
  • Pandas (data processing & indicators)
  • Broker API integrations
  • React (monitoring UI)

My Role

Sole Developer

  • Designed system architecture
  • Implemented concurrency model
  • Integrated broker APIs
  • Built backend services and automation logic
  • Developed monitoring dashboard
  • Deployed and maintained live trading instances

Tech used:

  • PythonTech icon
  • FastapiTech icon
  • ReactTech icon
Home | | GitHub | LinkedIn | Resume:
© 2023-2026 Utsav Moradiya | Source code distributed under MIT License