384I build for the war zone.
← Back to Arsenal

// case study · fintech

NSE Trading Engine.

SEBI-Compliant Algorithmic Trading

ElectronReact 19FastAPIAngel One API

// the problem

Algo-Bot kept missing SEBI circuit-breaker timing and retail APIs throttled mid-session. A production rewrite was the only way to trade inside compliance windows.

// overview

Retail algorithmic trading in Indian equity markets lives inside a hard compliance envelope: SEBI circuit-breaker timings, broker-level throttles, per-symbol position limits. Miss one and the trade doesn't just lose money — it gets rejected, or worse, fills outside the window you meant. Algo-Bot taught me what retail APIs can't do. This is what it looked like to rewrite around those constraints.

// how it works

  • 01Electron desktop frontend — a trader needs a kill switch within reach, not behind a browser tab.
  • 02FastAPI backend with an event-driven order loop — the loop itself enforces circuit-breaker windows; routes can't bypass them.
  • 03Angel One SmartAPI integration with exponential backoff on throttle and idempotent order IDs on retry.
  • 04Local SQLite position ledger — source of truth for P&L even when the broker API is lagging.

// measured impact

Order placement latency

< 1s

end-to-end to Angel One ack

Circuit-breaker misses

0

after rewrite, in backtested market days

Recoverable throttle events

100%

idempotent retry with exponential backoff

// what I'd change

Electron was the right call for the kill switch, wrong call for the resource footprint on older Windows machines. Next pass is probably Tauri — same UX, fraction of the memory, and the Rust backend would unify with the FastAPI rewrite I've been planning for the order loop.

// want one of these for your stack?

I take on systems work with clear, measurable outcomes.

Start a project