Options trading platform
Microsecond market-data handling for index options, with risk checks that never sleep.
- Type
- Client work
- Status
- Confidential client
- Platforms
- Trading engine, Realtime gateway, Web dashboard
Tape replay · per-stage latency
- Market-data decode, p50
- 2.5 µs
- Market-data decode, p99
- 8 µs
- Risk check, p50
- 21 µs
- Signal to order created
- ~0.5 ms
Client, broker, and strategy withheld.
The problem
Options strategies live or die on how fast market data turns into a decision, and on whether risk limits hold under a burst. The client needed one system for research, paper trading, and execution, with the same code path in each.
A private trading platform for index options on an Indian exchange: tick capture, research and backtesting, paper and live execution, and a control dashboard. Built for a client's internal use; details are anonymized.
What we built
- 01
An event-driven trading node
Built on a Rust-core event-driven engine, with a custom adapter for the broker's REST and WebSocket APIs.
- 02
Risk before every order
Position caps, a per-bar guard, and a kill switch that stops new risk without dropping the data stream. Live orders sit behind several independent gates.
- 03
A realtime gateway that cannot hurt trading
Market state fans out to the dashboard through Redis and a WebSocket gateway, throttled per instrument. If the gateway dies, trading does not notice.
- 04
Research on the same data
A Parquet tick archive queried with DuckDB and Polars, and a dashboard for comparing runs and building strategies visually.
Engineering notes
- Market-data decode on its own thread, handed to the engine loop thread-safely. Nothing blocking ever sits on the engine loop.
- The publisher is bounded and drops when full. It never blocks the trading path.
- Latency instrumented across 12 stages with exact percentile reservoirs, exported to Prometheus and Grafana with alert rules.
- Instrument identity read from a snapshot map, never derived from strings.
- Order logic kept free of engine imports, so it can be ported to Rust.
Stack
- Python
- Rust-core event engine
- FastAPI
- WebSocket / SSE
- Redis
- Postgres
- Parquet + DuckDB
- Polars
- Next.js
- Prometheus + Grafana
By the numbers
- Market-data decode, p50
- 2.5 µs
- Market-data decode, p99
- 8 µs
- Risk check, p50
- 21 µs
- Signal to order created
- ~0.5 ms
Measured in tape replay. Client, broker, and strategy details are withheld.
Services in this project
For your industry
Building something like this?
We built this. We can build yours.
Thirty minutes on how the work happens today. You leave with a written plan: scope, timeline, and a number.
More work
- 01NoteTubeA lecture becomes a study system: chat, flashcards, quizzes, all grounded in the source.Live
- 02KraftrOne flat-lay photo becomes catalog-ready 4K on-model imagery.Live
- 03PullsyInstagram analytics that keep the numbers Instagram throws away.Live
- 04GymFastMembers, billing, classes, and workout plans for a gym, in one platform and three apps.Live
- 05SigmaCPMConstruction project management where AI reads the tender and shows its work.Early access
- 06Siona JewelsA jewellery manufacturer's catalogue that buyers find on Google and in ChatGPT, and that turns a design number into a lead.Live
- 07The Sharp InteriorsThe site, the project gallery, and the IT behind an interior design studio.Ongoing IT partner
- 08Acasa SentinelGive it a number plate. It returns the vehicle's route across a CCTV network.Hackathon build, 2026