From install to live ticks.
StreamXLS streams Interactive Brokers TWS and IB Gateway data into native Excel =RTD() formulas. This page takes you from a fresh install to streaming quotes, positions, and orders in a worksheet. Each step is self-contained, so you can jump to whatever you need.
Two pieces, two jobs
StreamXLS installs two pieces. Knowing which is which makes everything else on this page make sense.
StreamXLS.dll, ProgID Tws.Rtd) that Excel loads in-process the moment a formula asks for it. No window, no ribbon, no tray icon; it stops when Excel closes.
You type formulas against the engine; you manage the product in the StreamXLS Control Panel.
What you need
- Windows with Microsoft Excel.
- Interactive Brokers TWS or IB Gateway, with the API enabled (see TWS setup).
- TWS API 10.47.01 or newer installed on the machine.
Install and start the trial
Run the installer. The 30-day, full-featured trial starts automatically the first time StreamXLS is used in Excel.
Once you've purchased a license, your key arrives by email. Open the StreamXLS Control Panel from the Start menu, paste the key, and click Activate. The StreamXLS Control Panel also shows your license status, TWS API status, and settings, so it's the first place to look when something isn't behaving.
More on the trial clock, watching it live from a worksheet, and activation in Your trial & license below.
To remove StreamXLS, uninstall it from Windows Settings → Apps. Because everything is per-user, uninstalling leaves no machine-wide residue.
Enable the API
In Trader Workstation, open File → Global Configuration → API → Settings and check "Enable ActiveX and Socket Clients". IB Gateway exposes the same setting under its Configuration panel. StreamXLS connects over that socket, so it runs against either TWS or IB Gateway.
Default socket ports:
- TWS live —
7496 - TWS paper —
7497 - IB Gateway live —
4001 - IB Gateway paper —
4002
StreamXLS connects to 127.0.0.1:7496 by default. The host, port, and client ID can each be set per formula (using optional connection topics) or in the StreamXLS Control Panel settings — so a single workbook can watch a paper and a live session at once.
Recommended: enable "Prepend $LEDGER- prefix to per-currency account values" on the same API settings page. It is ON by default for new TWS installs and OFF by default for upgraded ones. With it ON, StreamXLS resolves account-value cells cleanly — account-level aggregates (a bare CashBalance cell) and per-currency breakdowns (CashBalance with cur=EUR) are unambiguous. With it OFF, TWS delivers both under the same key and StreamXLS cannot tell them apart, so a bare dual-class cell (CashBalance, AccruedCash, UnrealizedPnL, RealizedPnL, StockMarketValue, and the other multi-category fields) shows an actionable #LEDGER-DISABLED … message — or #N/A — instead of risking a wrong number. The setting is global to the TWS session — it affects every API client connected to that TWS. Single-currency accounts are unaffected either way.
Type a formula, get a stream
Every value is a native Excel =RTD() formula against ProgID Tws.Rtd, addressed by a uniform topic-string tuple. There is no ribbon and no add-in to load — the engine starts the moment a cell asks for it. Topic and field names are case-insensitive. Start with the connection check; the rest follow the same grammar.
Replace U1234567 with your own account code, and AAPL with any contract. (A bare symbol defaults to STK/SMART/USD — except on the position topic, which deliberately leaves the exchange unconstrained so a symbol matches the position on whatever exchange TWS reports it.)
Why MarketPrice first? It blends Mid → Last → Close, so it produces the most relevant value at all times. For the strict last traded price, name Last instead: =RTD("Tws.Rtd", , "AAPL", "Last").
Delayed data looks live. Without the matching IB market-data subscription, TWS serves that symbol 15–20 minutes delayed — and by default nothing in a plain price cell marks it as delayed; a delayed quote is just a number, indistinguishable from a live one. The plain-numbers way to tell is the IsDelayed field: =RTD("Tws.Rtd", , "AAPL", "IsDelayed") returns 1 when TWS is serving that contract delayed data and 0 when it's real-time. Put it next to a price, or drive conditional formatting off it. See the Reference market-data fields for IsDelayed and the per-contract MarketDataType.
Return-value convention. A field returns a number (or text) when its value is known to be current. When it is not, time-sensitive fields default to returning #N/A rather than a stale value.
Go deeper
The formulas above are one grammar in miniature. Two pages go deeper: the Reference is the complete grammar — six topic families, every field, options and futures contract syntax, and order staging — and Configuration covers environment variables, logging, and tuning. The FAQ answers product and licensing questions; How it works explains what makes the engine production-grade.
For the exhaustive reference — every field, key, status value, and configuration knob, generated from the engine itself so it cannot drift — see the complete documentation set on GitHub.
A demo workbook illustrates every feature so you can start without reading further. The easiest copy to use is the one included with the installer (StreamXLS Control Panel → Open the demo workbook). You can also download it, but Excel blocks macros in any workbook downloaded from the internet until you unblock the file — see Troubleshooting.
Reference — the full grammar & fields → Configuration — tuning & diagnostics →
When something's off
Positions, orders, and account values work, but I get no market-data quotes.
Your TWS API install is almost certainly older than the supported 10.47.01. Modern TWS serves quotes only over a protocol negotiated at server protocol v206; an older API negotiates a sub-v206 protocol and TWS sends no market-data ticks, while orders, positions, account values, and P&L keep working. StreamXLS fails loud in this case: it withholds the quote topics rather than showing blanks.
Confirm it with the per-connection status fields: =RTD("Tws.Rtd", , "status", "MarketDataState") reads Ok / TooOld / Unknown, and MarketDataMessage carries the "update your TWS API" detail when it's TooOld. The fix is to update the TWS API to a current release and reconnect.
The deep explainer — why an old TWS API silently kills quotes while everything else keeps working — is at Configuration → The TWS-API version floor.
The connection to TWS dropped mid-session.
So long as TWS is accepting API connections, StreamXLS reconnects automatically and re-establishes the subscriptions that were active — you don't need to touch your formulas. Watch =RTD("Tws.Rtd", , "status", "IsConnected") to verify the connection.
Some cells show #N/A.
That is by design. StreamXLS never shows uncertain data as a stale number: when a time-sensitive value isn't known to be current — when TWS is disconnected or unresponsive — the cell reads #N/A instead of holding a last-good value. A visible gap is safer than a silently frozen price.
IsConnected is 0 and nothing streams.
Check that TWS or IB Gateway is running and logged in, that "Enable ActiveX and Socket Clients" is checked (see TWS setup), and that the port matches — defaults are 7496 for TWS live, 7497 for TWS paper, and 4001/4002 for the Gateway. StreamXLS connects to 127.0.0.1:7496 unless you override the host or port.
The demo workbook says "Microsoft has blocked macros from running because the source of this file is untrusted."
You opened a copy of the workbook that was downloaded — from this site or from GitHub. Windows tags every file that arrives from the internet, and Excel refuses to run macros in them. Two fixes, either works:
- Use the installed copy instead (Start menu → StreamXLS demo workbook). The installer places it locally, so it carries no internet tag and Excel opens it normally — this is the recommended copy.
- Or unblock the downloaded file: close it in Excel, right-click the file in File Explorer → Properties → check Unblock at the bottom of the General tab → OK, then reopen it. The workbook's macros are digitally signed by StreamXLS LLC — you can confirm that in Excel under File → Info.
How do I check my license state?
Read it live from Excel via the metadata topics =RTD("Tws.Rtd", , "LICENSE_STATE"), LICENSE_MESSAGE, and LICENSE_DAYS_REMAINING. The same details are shown in the StreamXLS Control Panel.
Your trial & license
The 30-day, full-featured trial starts automatically the first time StreamXLS is used in Excel — no key, no signup, nothing to configure.
Watch the clock from inside your workbook. The license fields resolve in every state, so you can build your own countdown:
=RTD("Tws.Rtd", , "LICENSE_DAYS_REMAINING") returns the whole days left in the trial;
LICENSE_STATE reads Trial / Paid / Expired (Reference lists the full set); and
LICENSE_MESSAGE carries the human-readable detail. The same status is shown in the StreamXLS Control Panel.
When you're ready, buy a subscription on the pricing page. Your license key arrives by email; open the StreamXLS Control Panel from the Start menu, paste the key, and click Activate. Your workbooks keep running unchanged.
Staying up to date
StreamXLS keeps itself current so it can track changes in the TWS API — but it never updates behind your back or interrupts a live session. Updates are advisory: you decide when to install.
How it checks. A scheduled task checks for a new version once a day, around 3 AM, whenever your machine is on — no administrator rights, and no network call from the engine inside Excel. You can also check on demand: open the StreamXLS Control Panel and click Check for updates.
How you're told. When a new version is found, the StreamXLS Control Panel shows it and Windows raises a brief notification pointing you there. A release marked critical gets a louder heads-up inside Excel: the =RTD("Tws.Rtd", , "UPDATE_MESSAGE") cell reads "IMPORTANT: a critical update (x.y.z) is available - install it before continuing," and once a day the engine also shows a dismissible reminder with a download link. The UPDATE_* fields let you check on updates from inside Excel.
How you install. Use the StreamXLS Control Panel's Install update action. It checks that Excel is closed, downloads the new installer and verifies it, and — once you confirm — closes itself and runs the installer. Because the engine lives inside Excel, an update can only apply while Excel is closed; StreamXLS refuses to overwrite a running engine rather than risk a half-applied update.
Every update is cryptographically verified before anything runs: the update manifest carries a signature only StreamXLS can produce, and the download is checked against that signed record, so an invalid update is rejected.
Still stuck?
If the answer isn't here, the support page covers how to reach us and what to include. Or email support@streamxls.com directly.