IBKR RTD not working? Fixing #N/A and stuck cells in Excel
Your =RTD() cells read #N/A, show nothing, or freeze mid-session. Here are the usual causes for Interactive Brokers RTD in Excel — in the order worth checking them — and the fix for each.
First, what =RTD() is doing. Excel's RTD function calls a Component Object Model (COM) Automation server for the purpose of retrieving data real-time, and its first argument is the ProgID of that server. When a cell shows #N/A, Excel is telling you it could not get a value from that server — usually because the server is not there, not registered, or not yet ready. Almost every problem below is a variant of that one fact, so work from the outside in.
1. #N/A everywhere — the ProgID is wrong or the server isn't registered
If every RTD cell is #N/A, suspect the ProgID or the registration before anything on the feed side. RTD looks up the first argument (for IBKR's own sample that is Tws.TwsRtdServerCtrl) in the Windows registry. A typo, a server that was never registered on the machine, or an RTD server that failed to load all produce a bare #N/A with no further explanation.
#N/A while a different, simpler RTD server works, the problem is registration or bitness (see §5), not your feed.
2. TWS or IB Gateway isn't running, or the API isn't enabled
An RTD server that streams Interactive Brokers data needs a live socket to TWS or IB Gateway. IBKR's own RTD troubleshooting lists a "Cannot connect to TWS" condition whose cause is that "TWS has not been configured properly for API socket connection."
3. Port mismatch
The RTD server connects to a specific TCP port, and TWS and the Gateway each default to different ones. If the port the RTD server is sent doesn't match the port your TWS is listening on, the connection never forms.
7496 (TWS live), 7497 (TWS paper), 4001 (IB Gateway live) and 4002 (IB Gateway paper). Confirm the number in API → Settings → Socket port and point your RTD server at the same one.
4. Some contracts resolve, others don't
If a handful of symbols work and others fail, the connection is fine — the contract is the problem. IBKR's RTD notes describe two conditions: "No security definition found," where the contract in the formula can't be located, and a contract that "does not uniquely define one single contract" (ambiguous).
5. 32-bit vs 64-bit Excel
An RTD server is an in-process COM component, and a COM server's bitness has to match the process that loads it. A 32-bit-only RTD server will not load into 64-bit Excel, and vice versa — which shows up as a persistent #N/A that survives every other fix.
6. Cells update, but slowly or in bursts
If data is flowing but only refreshes every couple of seconds, that's Excel, not your feed. Excel batches RTD updates on a throttle interval whose "default value is 2000 milliseconds." That's fine for most sheets, but may not feel adequate for a live trading dashboard.
Application.RTD.ThrottleInterval = 500. Per Microsoft, the new value "will persist when Microsoft Excel is restarted." Don't set it to zero on a busy sheet — you'll just move the bottleneck onto Excel's paint loop.
7. Data was streaming, then the server dropped
If everything worked and then went dark all at once, you may have tripped IBKR's message-rate limit. IBKR notes an "RTD Server disconnects from TWS" condition caused when the "API message rate of 50 messages/second is exceeded" — and each new subscription or cancellation counts as a message.
8. Zeros across many symbols
A wall of 0 rather than #N/A usually means you've run past your market-data allowance. IBKR notes this as "data shows '0' for many securities," caused by exceeding your Market Data Lines — the number of live streams your subscriptions permit at once.
Ctrl+Alt+= to see your allowed and currently-used market-data lines. Reduce concurrent quote subscriptions, or add market-data line packs to your subscription.
9. Everything works except quotes
If positions, orders, and account values populate, but market-data cells stay empty, the problem is likely an obsolete TWS API install.
Interactive Brokers moved market data onto a newer wire protocol that a modern TWS or IB Gateway will only speak once the connection negotiates a high enough server-protocol version. An older TWS API can't request or decode it, so a modern TWS sends zero market-data ticks — no error — while orders, positions and account values keep flowing over their still-supported legacy paths.
A well-behaved RTD server should tell you why a cell is empty, not just leave you with a bare #N/A. That's the design principle behind StreamXLS: when the TWS API is too old to serve quotes, it sends an actionable message rather than a silent blank, and it returns #N/A for a time-sensitive value it can't currently trust — because a visible gap is safer than a stale number shown as live.
The details are in the docs troubleshooting section and the TWS-API version floor explainer.