--- title: "IBKR RTD not working? Fixing #N/A and stuck cells in Excel — StreamXLS" description: "Why Interactive Brokers RTD cells show #N/A or stop updating in Excel — TWS not running, API not enabled, port mismatch, wrong ProgID, 32/64-bit, the message-rate throttle, the RTD update interval, or a stale TWS API version — plus the no-field and blank-argument errors. A fix for each." canonical: https://streamxls.com/ibkr-rtd-troubleshooting updated: 2026-08-15 source: markdown mirror of the HTML page at the canonical URL, generated at build time by gen-md.py — do not edit order_staging: "StreamXLS cannot send or trigger live orders. Staged orders do not transmit to the market unless a user clicks in TWS to submit." --- # Guide — 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. > **Fix:** Confirm the exact ProgID from your provider’s docs and that the server is installed and registered *on this machine*. Test with a formula you know is valid; if it stays `#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.”* > **Fix:** Start TWS or IB Gateway and log in. Then open *File → Global Configuration → API → Settings* and check **“Enable ActiveX and Socket Clients.”** No socket, no data. ## 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. > **Fix:** Match the port to the application. The defaults are `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). > **Fix:** Correct any typo in the contract specification. For an ambiguous symbol — one traded on several venues — add the primary exchange so it resolves to a single instrument. ## 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. > **Fix:** Check your Excel bitness under *File → Account → About Excel*, then make sure the RTD server you installed matches it. (IBKR’s ActiveX/Excel components, for instance, ship in both 32-bit and 64-bit builds — install the one that fits your Excel.) ## 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. > **Fix:** Lower it from the VBA Immediate window, e.g. `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. > **Fix:** Build the sheet so it makes *“at most 50 new subscriptions or cancellations per second.”* A workbook that materializes hundreds of RTD formulas at once — a paste, a filter, a big open — is the usual trigger. Stagger it, or let a server that paces its own requests handle the throttling for you. ## 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. > **Fix:** In TWS, press `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. > **Fix:** Update your **TWS API** install — that’s a separate package from the TWS or IB Gateway app; updating the desktop application does not update the API. Install **TWS API 10.47.01 or newer** — the current release is the safe choice. Then restart Excel. If the TWS API isn’t installed *at all*, StreamXLS says so in the cell rather than leaving a bare error: status cells — and the `TWSAPI_MESSAGE` field — read `StreamXLS could not find the TWS API on this machine. Install from interactivebrokers.github.io, or list its location in the StreamXLS Control Panel Settings.` ## 10. A cell reads “Unknown field”, “Market data field is required”, “Blank argument”, or “Empty field argument” This one is specific to StreamXLS, and it’s deliberate. If a market-data formula names a field StreamXLS doesn’t recognize — a misspelling like `LSAT` for `LAST`, or a field that isn’t in the catalog — the cell returns `RTD error: Unknown field 'LSAT'. See streamxls.com/docs-reference for supported fields.`. Three closely related messages report the opposite problem — no usable field. Which of the three you get depends on the shape of the mistake, and each one narrows the search: - `RTD error: Market data field is required (e.g., LAST, BID, ASK). Every formula names its field. See streamxls.com/docs-reference for supported fields.` — the formula named a contract and no field, with nothing blank about it: `=RTD("Tws.Rtd", , "AAPL")`. - `RTD error: Blank argument, and no field named. Name the field you want (e.g. LAST). See streamxls.com/docs-reference.` — no field was named *and* one of the arguments is blank, typically a cleared cell or a reference into an empty row. It says only that, because the blank could equally be an optional contract key written as `IF(B2="","","cur="&B2)`, or a blank connection cell. Note that this message, not the one above, is what a blank field cell produces. - `RTD error: Empty field argument. Name the field you want (e.g. LAST). See streamxls.com/docs-reference for supported fields.` — the field was named by key with nothing after the `=`: the shape `"qt="&B2` produces when `B2` is empty. > **Fix:** For `Unknown field`, check the spelling against the [market-data field catalog](https://streamxls.com/docs-reference#market-data). For the other three, name the field: `=RTD("Tws.Rtd", , "AAPL", "LAST")` — and if the field comes from a cell reference, make sure that cell isn’t empty. Naming the field is the one remedy that clears all three, whichever reading of a blank argument was correct. In a *market-data* formula the first key-less argument is always read as the contract, never as a field, so the field must be named in a later argument (or written as `qt=LAST`); bare metadata and status names such as `ServerVersion` or `VERSION` are a different topic family and are unaffected. The `position` and `order` topics name their field the same way, and carry the same family of messages worded for their own fields. ## 11. Position or P&L cells went #N/A after TWS reconnected When the link to TWS drops, StreamXLS blanks time-sensitive money cells — market value, unrealized / realized P&L, daily P&L — to `#N/A` rather than leave a stale figure on screen. Stale money is worse than no money. On reconnect it re-subscribes automatically and repaints each cell as soon as TWS re-reports the value. > **Fix:** Usually nothing — give the reconnect a moment (it can take longer while Excel is busy; `Application.RTD.RefreshData` forces it). If a money cell *stays* `#N/A` after `=RTD("Tws.Rtd", , "status", "IsConnected")` reads `1` again, the position may simply be closed or flat — a position that no longer exists produces no value to paint — or your account filter may not name the account that holds it. Confirm what’s actually open with `=RTD("Tws.Rtd", , "positions", , "SymbolsCsv")`. ## 12. A position cell won’t resolve, but I hold the position StreamXLS matches a `position` formula against your holdings by the contract you spell out — and it never guesses at a near-match. If your description differs from how TWS holds the contract (a different exchange, a missing or wrong trading class, `STK` where the position is an `OPT`), nothing matches: the size field reads `0` and the value fields have nothing to paint. It resolves to no-match rather than silently binding to a similar-looking contract. > **Fix:** Broaden or correct the contract description — often the bare symbol is enough (`"AAPL"` rather than a full spec) — and check the security type and account code. The exact way TWS holds each position is readable with `=RTD("Tws.Rtd", , "positions", , "SymbolsCsv")`; copy the spelling from there. The [contract-specification reference](https://streamxls.com/docs-reference#contracts) covers every way to name an instrument. > **A note on fail-loud design** > > 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 missing, or 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](https://streamxls.com/docs#troubleshooting) and the [TWS-API version floor](https://streamxls.com/docs-config#version-floor) explainer. [The account/positions/orders gap →](https://streamxls.com/ibkr-excel-account-positions-orders) · [RTD vs DDE vs ActiveX →](https://streamxls.com/ibkr-excel-rtd-vs-dde-vs-activex) · [Python in Excel vs RTD →](https://streamxls.com/python-in-excel-vs-rtd) · [All writing](https://streamxls.com/writing) --- *StreamXLS is not affiliated with, endorsed by, or sponsored by Interactive Brokers. Trader Workstation, the TWS API, and Excel are products of their respective owners; their use is governed by their respective licenses. StreamXLS does not provide investment advice or recommendations.* *Markdown mirror of , generated at build time. Every public page on this site is also served as markdown at the same path plus `.md`. Index: .*