Trading platformFintech start-upanonymised, sample data
Tapelight is a trading terminal and the engine behind it. Traders watch live quotes, chart them with indicators and place orders. The engine handles orders, positions, margin and forced liquidation. It has a web client and native iOS and Android apps.
Invented instruments update in a watchlist and on a candle chart, and a buy order is checked and filled. The position's profit moves with the price and a stop-loss line is dragged to a level the server checks.
The client wanted a trading platform they control end to end: their own interface, API, database and engine. The first release is demo trading against a simulated market, so no broker is needed. Live broker connections come later through a separate adapter layer. Client details are anonymised.
A trader needs to trust three things: the price on screen is real, the order went through once, and the balance is right to the cent. The hard parts are exact money maths, duplicate clicks, stop losses that fire when nobody is logged in, and consistent margin calls.
Traders needed live quotes, charting, fast order entry and margin calculated correctly every time. I built Tapelight as a custom trading platform: the terminal on web and mobile, and the order and margin engine behind it.
I split the engine into small packages with no framework code: domain types, orders, positions, margin, market data, indicators, alerts and strategies. An API server wraps them, streams quotes and account updates over WebSockets, and stores everything in Postgres. Executed history is append-only, so the ledger can be replayed and audited. Clients only send commands; the server re-checks every request.
No. The adapter layer is built and tested, but no real money moves.
From a live feed when one is configured, or a seeded simulator. The engine never switches on its own, and simulated data is labelled.
Yes. They use the same engine packages for validation, fills, margin and stop-out.
Not yet. I don't publish numbers I can't verify.

Tell me the problem in your own words. I will reply with what would carry over from this build and what would change for you.
The web terminal and the iOS and Android apps talk to one API server over HTTPS and WebSockets, scoped per account. The server has one writer per account. Its tick loop takes prices from a live or simulated feed and passes them to the order, position, margin and alert engines. Results are written to Postgres as an append-only ledger, with a cache alongside for fast reads.
Every price and amount is a whole number of minor units with a stated number of decimal places. CI fails the build if a migration adds a floating-point column.
The engine picks the live feed or the simulator once, at start-up. If the live feed fails, it reports the failure and stops. Simulated prices on a live screen would be worse than an outage, because a trader could act on them without knowing.
The margin check and the write that uses it are separate steps, so trade requests are queued per account. This relies on running one API instance, and the code says so.
Below the stop-out level, the engine closes the worst floating loss first, with a fixed tie-break, and records the reason. A conformance test suite checks the margin and liquidation calculations against known expected values.
Facing the same problem in your business?
Send an enquiryFintech founders and brokerage operators who want to own their trading stack, and teams that need a demo or paper-trading environment before going live.