Behind the Scenes: The RaptorBit AI Execution Stack That Processes a Trade in Milliseconds
The signal engine is only half the story. From the moment you press “Activate” to the moment the order fills, dozens of micro-decisions happen inside the RaptorBit AI execution stack — most of which you’ll never see. This is the behind-the-scenes tour of the stack that processes a trade in milliseconds, with none of the magical-black-box theatre.
Stage 1 — The intent handoff (0–3 ms)
You press Activate. Your click is wrapped into a signed intent payload containing the signal ID, the confirmed size, and your workspace’s current risk context. The payload is dispatched over our internal event bus to the execution gateway. Signing matters: later, during the audit, we can prove the intent you dispatched matches exactly what we executed.
Stage 2 — The second pre-flight (3–8 ms)
Yes, a second pre-flight. The signal engine’s risk pre-flight might have been milliseconds old; the execution gateway runs a fresh pre-flight on the current pool state. Why? Because between signal creation and your click, you might have taken another trade, the market might have moved, or a broker might have degraded. This stage is where “we checked when the card was built” is not good enough.
Stage 3 — The broker-routing decision (8–15 ms)
If your account is linked to a single broker, this stage is simple. If it’s linked to a multi-broker setup (available in the EU on request), the routing engine compares current spread, current latency, available margin and historical fill quality for the symbol. The chosen broker and the reason it was chosen are logged.
Stage 4 — The order shaping (15–20 ms)
Order shaping is where many retail bots cut corners. RaptorBit’s shaper looks at the current top-of-book, the recent realised volatility, and the recommended size, and decides whether to send:
- A single market order, if the size and spread allow.
- A series of child orders (iceberged), if the size is large relative to visible depth.
- A limit order at a specific price point if the current spread is unusually wide.
The chosen shape is attached to the order record. If you want to see which shape was used on any trade, it’s in the audit trail.
Stage 5 — The dispatch (20–30 ms)
Orders go to the broker over FIX protocol (for direct brokers) or a REST/WebSocket channel (for brokers who don’t offer FIX). Every outbound message carries a correlation ID so acknowledgements can be matched back to the right internal event. Dispatch is where the first live external latency hits — the broker takes over timing from here.
Stage 6 — The acknowledgement & the fill tape
Acknowledgements come back within milliseconds for most brokers. Partial fills, cancels and rejections all land on the fill tape. The tape is streamed into your dashboard in real time, which is what you see on the “Execution tape” screen in the workspace.
Stage 7 — The post-trade reconciliation
After the order is complete (filled, cancelled, rejected or expired) the reconciliation worker runs. It compares the broker’s reported state to our internal state. Any mismatch triggers an alert, surfaces on your dashboard, and is logged in the audit trail. Historically, mismatches are rare — but the fact that we expect them and surface them is what makes the audit trustworthy.
Stage 8 — The P&L write-back
Realised P&L on the trade is written to both your deposited-capital pool and your realised-profit pool, following the accounting rules. This is also where high-water-marks are updated. If a high-water-mark is updated, the risk governor refreshes its working thresholds immediately.
Stage 9 — The audit-trail write
Every step above produces an audit record. The records are chained with a cryptographic hash — each new record contains the hash of the one before it. You can inspect any trade’s chain and, if you wish, verify it independently. This is the honest version of what “blockchain-grade audit” means in trading tech.
Stage 10 — The explain pass
Finally, the explanation model writes a short post-trade summary: what the broker reported, how slippage compared to the expected band, whether the order shape used the right strategy for the live market conditions, and whether anything in the audit raised an eyebrow. The summary is attached to the trade record and surfaced on your weekly digest email.
What this stack buys you
- Speed without blindness. Milliseconds matter, but we never let speed skip the pre-flight or the reconciliation.
- Routing honesty. You can see which broker was chosen for every order and why.
- Full-chain audit. Nothing is lost in translation between signal, click, dispatch and fill.
- Post-trade self-critique. The explain pass is what turns raw audit data into learnable material.
Common questions we hear
Why not use a single mega-model that just outputs the trade?
Because debugging a single mega-model is impossible. We split the stack into inspectable stages on purpose. Every stage can be unit-tested, instrumented and reasoned about on its own.
What if the broker goes offline mid-order?
The broker-health check runs continuously. If the broker’s acknowledgement latency jumps above the amber threshold, the shaper stops sending new orders and the dashboard warns you. Existing open orders remain in whatever state the broker last reported, and we surface that state faithfully.
What’s the slowest part of the chain?
It’s always the broker. The RaptorBit side of the chain is bounded in milliseconds; the broker side varies from single-digit ms to a few hundred ms depending on the venue. We publish broker-latency histograms inside your weekly digest.
Where to go next
If you’ve already read The Anatomy of a Raptor-Grade Signal and AI Risk Thresholds Explained, you now have the full picture: how a signal is generated, how risk thresholds decide whether to let it fire, and how the execution stack carries it from your click to a filled order.
For the broader “why do most automated setups fail”, read Why 97% of Automated Trading Setups Fail.
Educational material only. Not investment advice. Trading involves risk of partial or total loss of capital.