RTD vs DDE vs ActiveX for Excel and Interactive Brokers
IBKR ships three ways to wire the TWS API into Excel — plus the manual-export path many people fall back to. Here's what each one is, and the honest trade-offs.
The TWS API download includes sample spreadsheets for three Excel technologies — RTD, ActiveX, and DDE. They are, in IBKR's words, "simple demonstrations of API functionality… not intended to be used as production level trading tools." Beyond those three, there's the fourth option nobody markets but everybody uses: exporting data out of IBKR by hand. Here's how they compare.
RTD — the modern, non-blocking one
RTD (Real-Time Data) is Microsoft's current protocol for streaming values into cells. The RTD worksheet function calls a Component Object Model (COM) Automation server for retrieving data real-time:" the server runs in-process and pushes new values to Excel when they change, so the sheet stays responsive while data flows. It's the least fiddly of the three to use — you type a formula and values appear.
The catch is coverage. IBKR's RTD sample is scoped to market data: "only top-level market data is supported via TWS RTD Server API. No trading capability or other data types are supported." Great for a quote board; it won't give you account values, positions, or orders on its own. (More on that gap here.)
DDE — full breadth, older plumbing
DDE (Dynamic Data Exchange) is the old bridge, and its selling point is reach: per IBKR's comparison, the DDE path exposes full API functionality (as of API v975) — market data, accounts, positions, and orders. If you need the account and order half in Excel without writing socket code, DDE has historically been the built-in way to get it.
The cost is the plumbing. DDE is a decades-old Windows protocol: it can block Excel's user interface, other DDE-using applications on the same machine can interfere with it, and it strains under a fast, heavy feed. It also takes more configuration to stand up than RTD. It works — with more caveats and more care.
ActiveX — full breadth, harder to build on
ActiveX drives the API from Excel through a COM control (IBKR provides it as the open-source TWSLib, in 32-bit and 64-bit builds). Like DDE, it carries the full API surface. But IBKR is direct about the downside: the ActiveX Excel API "is more difficult to program as compared to other Excel APIs and not as robust as non-Excel socket-based API applications." You get breadth at the price of writing and maintaining more COM-bound VBA.
Manual export — no live feed at all
When none of the above fits, people fall back to exporting. TWS Export functionality and IBKR's Flex Queries produce your positions, balances and activity as downloadable files you can pull into Excel on a schedule. It's reliable and it's fine for reconciliation and reporting — but it's a periodic snapshot, refreshed when you ask, not a live stream. For a trading screen that has to be current to the second, it isn't the tool.
Side by side
| RTD | DDE | ActiveX | Manual export | |
|---|---|---|---|---|
| Account / positions / orders | No (market data only) | Yes (v975) | Yes | Yes (as files) |
| Live streaming | Yes (push) | Yes | Yes | No (snapshot) |
| Keeps Excel responsive | Yes, by design | Can block the UI | Varies | N/A |
| Setup / maintenance | Lightest | Heavier config | Most code | Scriptable |
| IBKR's own caveat | Sample = demo | Sample = demo | "Harder… less robust" | — |
The through-line: RTD is the pleasant one to use but market-data-only in IBKR's sample; DDE and ActiveX reach the account and order data but are the older, heavier, or more code-hungry paths; manual export gives you everything except the thing a live dashboard needs — currency. The interesting engineering problem is getting RTD's responsiveness and the full data breadth at once.
StreamXLS is a production RTD server that keeps RTD's push model and non-blocking behavior while extending coverage past market data — account values, positions with P&L, and live order state all arrive through the same =RTD("Tws.Rtd", …) grammar, with no DDE and no ActiveX VBA to maintain.
See how it works or the docs.