Connect Interactive Brokers to Trade3Dx

Trade3Dx supports IBKR and NinjaTrader 8. The IBKR bridge connects locally to TWS or IB Gateway and passes subscribed quotes, Smart Depth and trades to the chart.

Download the app and IBKR bridge

1. Install Trade3Dx and extract the bridge

Run the signed Trade3Dx 1.0.4 installer on Windows 10 / 11 x64. Start your 14-day trial on Pricing, then activate the desktop app in Account. No card is required to start; the trial ends without a charge if you do not add a payment method.

Extract the entire IBKR Bridge 0.1.2-beta ZIP to a writable folder. Keep all files and Assets together, then run Trade3Dx.IbkrBridge.exe. The package includes its .NET runtime. It is a separate app; do not import it into NinjaTrader.

2. Install the official IBKR C# API

Get the Windows TWS API package directly from IBKR API Downloads and accept its terms. TWS alone does not provide the C# API library the bridge needs.

If the API package has no built CSharpAPI.dll, install the .NET 8 SDK and build its C# client for net8.0. With the standard API installation location, run:

dotnet build "C:\TWS API\source\CSharpClient\client\CSharpAPI.csproj" -c Release -f net8.0

The bridge searches the standard API build folders automatically. You can also copy your built CSharpAPI.dll into the extracted bridge folder. IBKR's library is supplied separately; Google.Protobuf is included with the bridge.

3. Enable API access in TWS / IB Gateway

Log into TWS or IB Gateway. In TWS open Global Configuration → API → Settings and enable ActiveX and Socket Clients. Allow the local host 127.0.0.1 through the trusted-IP settings or connection prompt. This market-data bridge does not place orders; Read-Only API can remain enabled.

Choose the matching bridge preset and make sure the platform's socket port uses the standard value shown below. The GUI presets use these ports:

PlatformLivePaper
TWS74967497
IB Gateway40014002

Use a unique client ID; the bridge defaults to 73. Keep the platform logged in and approve any local API connection prompt.

4. Choose your instrument and start the bridge

For a US stock, enter its symbol, STK, SMART and USD. For futures, use the correct symbol, FUT, exchange and expiry or local symbol. Leave tick size blank to resolve contract details; specify a value only when you know the correct tick increment.

Depth rows defaults to 60 per side. You may request more; actual depth and venue coverage depend on IBKR's service, the instrument and your subscriptions. More requested rows does not guarantee unlimited depth.

Click Start. Open Trade3Dx and click Connect. The bridge window distinguishes IBKR readiness from the Trade3Dx pipe connection. Use one bridge at a time: stop the NT8 bridge before starting IBKR, and stop IBKR before switching to NT8.

What the IBKR feed represents

Quotes come from tick-by-tick BidAsk, trades from tick-by-tick Last, and depth from one Smart Depth subscription. Active depth rows are summed by price with available venue details. Trade side is inferred from the latest quote.

The API book can differ from a TWS Level 2 panel using another venue view or updating at another moment. IBKR describes Smart Depth as comparable to BookTrader. Compare the same instrument, subscribed venues and book mode.

Live DOM shows the current received book. Locally recorded heatmap depth can carry the last observed value when a level leaves the subscribed window; its current liquidity is then unknown. Carry-forward history does not prove an order still exists. An IBKR depth reset clears the active book.

Trade3Dx does not supply market data or expand your IBKR entitlements. Live depth and tick-by-tick permissions must be enabled for your account and instrument.

Connection troubleshooting

  • Not API-ready: check login, API socket clients, preset/port, trusted local IP and client-ID conflicts.
  • Missing API DLL: install and build the official C# API, or put your built CSharpAPI.dll beside the bridge executable.
  • Connected without data: verify contract, exchange, live API subscriptions and any permission error in the bridge window.
  • Pipe unavailable: stop other IBKR / NT8 bridges and connect Trade3Dx again.
  • TWS disconnect or restart: click Stop, restore TWS / Gateway, then Start again. This bridge currently requires a restart to restore an IBKR session.

Official references: TWS API download · API settings · Smart Depth.