§ · How it works

What StreamXLS is.

One DLL, one COM registration, one demo workbook illustrating every feature so you can start without reading documentation. No Excel ribbon, no add-in; StreamXLS doesn't run until you ask for it via Excel-native =RTD() formulas. The engine runs against your own entitled TWS API installation, on your own machine.

§ · What makes it production-grade

Fail loud

When the trader looks at a cell, they have to be able to trust it. A blank cell is honest — it says the system doesn't know. A cell that shows data that has quietly gone stale is a trade error waiting to happen. So the engine is built to fail loud: a contract repeated throughout the code is that stale data is worse than no data. On a dropped connection, realtime prices are designed to read #N/A rather than holding a last good value — so a stale price surfaces as a visible gap rather than a silently frozen number.

Holding to that design principle — across broken connections and the undocumented quirks on both sides of the bridge — is the part of production engineering that real money makes non-negotiable.

That principle, and the war stories behind it, are the subject of the writing →

§ · The gap it closes

From sample to production-grade

Interactive Brokers ships a sample Excel RTD server with the TWS API. Per IBKR's documentation, it is "not intended to be used as production level trading tools." It is a teaching artifact that streams top-of-book quotes, with callbacks for account values, positions, and orders left as empty stubs.

Closing the gap means implementing the API to subscribe and receive all market-data fields, account values, positions, and orders; supporting multiple accounts; implementing COM-compliant multithreading so the stream survives even when Excel's UI is busy or blocked; hardening against TWS exceptions — detecting silent disconnects and rate limits, reconnecting and resubscribing automatically; late-seeding and deduplicating between RTD topics and TWS subscriptions; and ensuring multiple Excel instances can run RTD streams against the same TWS. That's the work StreamXLS does — at first for my own desk, now for anyone with the same needs.

The full case for why a spreadsheet is the right host is its own essay. Read it →

— StreamXLS

§ · The product

Technical features

01
Automatic reconnection
When TWS restarts or the link drops mid-session, StreamXLS reconnects and re-issues the subscriptions that were active. While the link is down, realtime price fields are designed to return #N/A rather than show a stale value.
"status", "IsConnected" → Connected
02
Keeps working when Excel is busy
Excel pauses RTD updates while a modal dialog is open or a cell is in edit mode. StreamXLS keeps processing the TWS feed on its own threads and delivers the buffered data once Excel is ready to receive it.
data caches · keeps receiving
03
Subscription deduplication
Multiple =RTD() calls referencing the same API topic are deduplicated by StreamXLS, minimizing the demand on TWS.
N copies → 1 TWS subscription
04
Order staging from Excel
A dedicated SendOrder topic stages an order as the side-effect of subscribing; the formula returns SendingStaged, or a structured error. Orders stage in TWS for the trader to release by clicking Transmit.
RTD("Tws.Rtd", , "SendOrder", …)
05
Beyond market data
Stream not only market data, but also account values (136 fields, per-currency), positions, P&L, and orders — every API field provided through Excel =RTD() formulas.
market · accounts · positions · orders
06
Standard Excel RTD
Native Excel =RTD() formulas just work — no add-in, nothing new to learn. StreamXLS registers its own short ProgID, Tws.Rtd alongside IBKR's sample (Tws.TwsRtdServerCtrl) with no conflict. The engine runs against your own entitled TWS API installation.
ProgID: "Tws.Rtd"