--- title: "Get Started — StreamXLS" description: "Get started with StreamXLS — requirements, install and the 30-day trial, TWS and IB Gateway API setup, your first =RTD() formulas in Excel." canonical: https://streamxls.com/docs 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." --- # Get Started — 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. ## The two pieces — Two pieces, two jobs StreamXLS installs two pieces. Knowing which is which makes everything else on this page make sense. ### The Engine *Invisible · lives in Excel* An RTD server (`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. ### The StreamXLS Control Panel *Visible · in the Start menu* A visible Start-menu app for license activation, status, and settings. The first place to look when something isn’t behaving. *You type formulas against the engine; you manage the product in the StreamXLS Control Panel.* ## Requirements — What you need - **Windows** with **[Microsoft Excel](https://streamxls.com/faq#excel-versions).** - **Interactive Brokers [TWS](https://www.interactivebrokers.com/en/trading/download-tws.php)** or **[IB Gateway](https://www.interactivebrokers.com/en/trading/ibgateway-latest.php)**, with the API enabled (see [TWS setup](https://streamxls.com/docs#tws-setup)). - **[TWS API 10.47.01](https://interactivebrokers.github.io/)** or newer installed on the machine. ## Install & trial — 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](https://streamxls.com/docs#trial-license) below. To remove StreamXLS, uninstall it from **Windows Settings → Apps**. ## TWS / Gateway setup — 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), 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. ## Your first formulas — 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. | Topic family | Grammar | Example formula | Result in the cell | |---|---|---|---| | Connection check | `status, ` | `=RTD("Tws.Rtd", , "status", "IsConnected")` | `1` | | Market data | `, ` | `=RTD("Tws.Rtd", , "AAPL", "MarketPrice")` | `187.42` | | Account value | `account, , ` | `=RTD("Tws.Rtd", , "account", "U1234567", "NetLiquidation")` | `1,284,902` | | Positions | `position, , , ` | `=RTD("Tws.Rtd", , "position", "*", "AAPL", "UnrealizedPnL")` | `10,824.00` | | Order monitoring | `orders, , ` | `=RTD("Tws.Rtd", , "orders", "*", "OpenListCsv")` | `822,823` | 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](https://streamxls.com/docs-reference#market-data) 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. ## Reference — Go deeper The formulas above are one grammar in miniature. Two pages go deeper: the **[Reference](https://streamxls.com/docs-reference)** is the complete grammar — six topic families, every field, and options and futures contract syntax — and **[Configuration](https://streamxls.com/docs-config)** covers environment variables, logging, and tuning. The [FAQ](https://streamxls.com/faq) answers product and licensing questions; *[How it works](https://streamxls.com/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](https://github.com/StreamXLS/streamxls/tree/main/docs). 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](https://streamxls.com/StreamXLS.xlsm), but Excel blocks macros in any workbook downloaded from the internet until you unblock the file — see [Troubleshooting](https://streamxls.com/docs#troubleshooting). [Reference — the full grammar & fields →](https://streamxls.com/docs-reference) [Configuration — tuning & diagnostics →](https://streamxls.com/docs-config) ## Troubleshooting — 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](https://streamxls.com/docs-config#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](https://streamxls.com/docs#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** (StreamXLS Control Panel → *Open the demo workbook*). The installer places it locally, so it carries no internet tag and Excel opens it normally. - **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 — 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](https://streamxls.com/docs-reference#status) 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](https://streamxls.com/buy). 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. ## Updates — 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 Windows task checks for a new version once a day. 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](https://streamxls.com/docs-reference#metadata) 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. 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. ## Help — Still stuck? If the answer isn’t here, the [support page](https://streamxls.com/support) covers how to reach us and what to include. Or email [support@streamxls.com](mailto:support@streamxls.com) directly. --- *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: .*