Trading Automation Platform
A configuration-driven trading research and execution backend for market-data ingestion, strategy testing, paper execution, and controlled live exchange integrations.
PRODUCT & DOMAIN CONTEXT
Quantitative strategy testing and automated execution require strict separation between exchange adapters, normalized candle/orderbook data models, signal calculators, and order execution engines. This system interacts with crypto exchanges (Bybit, Bitget, BingX) via REST and WebSocket APIs.
THE CORE ENGINEERING PROBLEM
Automated trading software faces exchange rate limits, network latency variations, order state discrepancies, and execution slippage. The backend required hard risk controls, order status reconciliation loops, environment isolation (demo/testnet vs live), and deterministic paper-execution and backtesting paths.
SYSTEM ARCHITECTURE MAP
Data Flow & Boundary Topology
Execution daemons interact with exchange WebSocket tickers for real-time market data. Trading signals pass through local risk guards before sending signed order requests to exchange REST endpoints. All trades, fills, and logs persist locally.
Exchange Tickers & Order Execution
HMAC Signing & Normalization
Position Sizing & Kill Switch
OHLCV Candles & Trade Audit
Process Management & Alerts
Integration Boundaries & Protocols
SYSTEMS & SERVICES BUILT
Core Backend Modules & Responsibility
Exchange Adapter Integration Layer
Unified object-oriented interfaces wrapping exchange REST and WebSocket endpoints, handling HMAC-SHA256 signature generation, rate-limit backoff, and orderbook normalization.
Market Data Ingestion & Backtesting Engine
Fast Pandas-based data pipeline converting tick data into standardized OHLCV candles, computing technical indicators, and executing historical strategy simulations.
Risk Guardrail & Order Execution Runner
Execution daemon enforcing stop-loss rules, position size limits, balance checks, and automated order reconciliation loops.
Detailed Technical Responsibilities
- •Engineered Python data ingestion pipelines downloading historical candles, trades, and orderbook snapshots into SQLite / Pandas datastores.
- •Built normalized exchange adapter classes unifying ticker symbols, order placement DTOs, and balance responses across Bybit, Bitget, and BingX.
- •Designed a modular backtesting and paper-trading framework supporting indicator calculation, risk management parameters, and order execution simulation.
- •Implemented safety guardrails including maximum order sizing, daily loss caps, and panic kill-switch endpoints.
ENGINEERING DECISIONS & TRADE-OFFS
Architectural Choices & Rationale
Explicit Exchange Adapter Interfaces
Adding a new exchange requires writing a dedicated adapter mapping all standardized methods.
Local File/SQLite Persistence for Research
Limited concurrent multi-node write throughput, suitable for single-agent execution.
RELIABILITY & SAFETY MECHANISMS
- •Hard limits on max leverage, max order value, and daily drawdowns embedded at the adapter boundary.
- •Automatic order reconciliation polling to detect ghost orders or unconfirmed exchange fills during network glitches.
- •Secrets managed exclusively via environment variables and isolated testnet configurations.
CHALLENGES & RESOLUTION
Exchanges enforce strict request weight limits per IP. Solved by implementing dynamic token-bucket rate limiters in Python that queue API calls before exceeding exchange thresholds.
VERIFIED OUTCOMES
- •Built a flexible, robust automated trading research and execution codebase.
- •Supported long-running paper and testnet execution on Linux server instances.
NEXT SYSTEM IMPROVEMENTS
- •Add Telegram bot integration for real-time order fill and stop-loss execution notifications.
Interested in discussing this architecture or an open backend role?
Reach out via email or review my full experience on my resume.