Naïve (the bug)
Strategy passes "lots" everywhere; trusts the broker to interpret it. NFO/BFO orders silently under-size by lot-size×.
# strategy/oc.py — wrong for NFO/BFO order = OrderRequest( instrument=NIFTY_CE, quantity=lots, # ❌ 3 sent as raw "3" side="SELL", )
Disciplined (the fix)
Equity strategies multiply by lot_size at the boundary. MCX passes lots directly. The rule is written in CLAUDE.md and checked in code review.
# equity strategies order_qty = lots * cfg["lot_size"] order = OrderRequest(quantity=order_qty, ...) # MCX strategies order = OrderRequest(quantity=lots, ...)