Setup guide · Mac, Windows and Linux · about 5 minutes

Install the TraderFrame Bridge for Interactive Brokers

The Bridge is a small app that runs beside IB Gateway on your computer and carries your bots’ orders to Interactive Brokers. Your IBKR login and two-factor stay with you; the Bridge holds one token.

The TraderFrame Bridge window: a Bridge token is pasted, Connect is pressed, and IB Gateway, TraderFrame, the paper account and market data come up one by one
Trader Frame listening for the Bridge, then the Interactive Brokers account card reading Bridge online with Bridge 1.3.8

Before you start

What you need, and where the Bridge sits

Interactive Brokers takes no API key. The Bridge runs on the same computer as IB Gateway, talks to it on 127.0.0.1, and checks in with Trader Frame every 15 seconds.

An IBKR account

Paper to start. Individual accounts only: linked and advisor accounts are not supported.

IB Gateway with the API on

Or Trader Workstation. Logged in, with the API turned on as in step 2 of the futures guide.

API settings in the futures guide

Your Bridge token

From Trader Frame, when you add the Interactive Brokers account. Step 1 below shows where.

A computer that stays on

A Mac with Apple silicon, a 64-bit Windows PC, or Linux with Python 3. The same one that runs IB Gateway.

On your computer
Trader Frame
Your bots decide the orders
TraderFrame Bridge
Holds one token, carries orders
IB Gateway or TWS
Logged in, API turned on
Interactive Brokers
Your paper or live account

The Bridge places orders only for commands Trader Frame queued for your account, and reports every fill back. It never trades on its own.

Step by step

From a Bridge token to Bridge online

Do the steps in order. Each one ends with something you can see, so you know it worked before you move on.

01
Step 1 of 5

Get your Bridge token

  • Open Brokers and press + Connect broker.
  • Pick Forex & stock, then Interactive Brokers, and press Continue.
  • Choose Paper.
  • Press Get my Bridge token, then Copy. Keep the sheet open: the downloads are on it too.

The token stays the same until you disconnect the account. Brokers › ⋯ › View Bridge token shows it again. Treat it like a password.

Opening the Interactive Brokers connect sheet from the Brokers page and copying the Bridge token
02
Step 2 of 5

Download the Bridge for your computer

  • In the same sheet, under The Bridge, pick the download for the computer that runs IB Gateway.
  • Mac: Download Bridge for macOS. It is for Apple silicon, signed and notarized by Apple.
  • Windows: Download for Windows, a 64-bit installer.
  • Linux or anything else: the Python version.
TraderFrame Bridge 1.3.8
In the connect sheet, under The Bridge
macOS
TraderFrame-Bridge-mac.zip
Apple silicon. Signed and notarized by Apple.
Download Bridge for macOS
Windows
TraderFrame-Bridge-Setup.exe
64-bit installer. No admin rights needed.
Download for Windows
Linux and other systems
traderframe-bridge-latest.zip
The Python version. Needs Python 3.
Python version
03
Step 3 of 5

Install it

  • Mac: unzip it and open TraderFrame Bridge.
  • Windows: run the installer. If Windows says “unknown publisher”, choose More info, then Run anyway. It installs for your user only, no admin rights needed.
  • Linux: unzip it and run ./start.command. The first run sets up its own Python environment, then asks for your token in bridge.json.
Install it on the computer that runs IB Gateway. The Bridge reaches Gateway on 127.0.0.1, so it cannot be on another machine.
Installing, by system
Mac, Windows, Linux
Mac
  1. 1
    Unzip TraderFrame-Bridge-mac.zip.
  2. 2
    Open TraderFrame Bridge.
Windows
  1. 1
    Run TraderFrame-Bridge-Setup.exe.
  2. 2
    If Windows says “unknown publisher”: More info, then Run anyway.
  3. 3
    It installs for you only and opens the Bridge when it finishes.
Linux
  1. 1
    Unzip the Python version and run ./start.command.
  2. 2
    The first run prepares its own Python environment and creates bridge.json.
  3. 3
    Put your token in bridge.json and run it again.
04
Step 4 of 5

Paste your token and connect

  • Open the Bridge you installed.
  • Paste your Bridge token.
  • Press Connect.
  • It finds IB Gateway on its own, on port 4002, 4001, 7497 or 7496, and checks in with Trader Frame.

The Bridge remembers the token and reconnects every time it opens.

The TraderFrame Bridge window connected: IB Gateway on port 4002, TraderFrame checked in, a paper account and delayed market data
05
Step 5 of 5

Check the account in Trader Frame

  • Back in Trader Frame, press I’ve done this.
  • The sheet listens: the Bridge checks in within about 20 seconds.
  • The account card reads Bridge online, with its balance.
  • Bridge online · delayed data is normal on paper.

Still nothing after a minute? Look at the Bridge window: it says whether it reached IB Gateway and whether Trader Frame accepted the token.

The account cards on the Brokers page, with the Interactive Brokers card reading Bridge online, delayed data, and Bridge 1.3.8

Reading the Bridge window

Four lines tell you everything

The window shows IB Gateway, Trader Frame, the account and market data, each with a coloured dot. Green on the first three means your bots can trade.

Below the four lines
Activity keeps a running log of what the Bridge did.
Open log folder shows the full log files if support asks for them.
Line
What you see
What it means
IB Gateway
Connected on port 4002
Found Gateway. 4002 is paper Gateway, 4001 live Gateway; 7497 and 7496 are TWS.
IB Gateway
Not reachable. Start IB Gateway, log in, and enable the API
Gateway is closed, logged out, or its API is off.
TraderFrame
Connected · last check-in 3 s ago
Trader Frame has the account. Check-ins run every 15 seconds.
TraderFrame
Token rejected. Copy it again from TraderFrame
The token was copied wrong, or the account was disconnected.
TraderFrame
No answer from TraderFrame for 40 s
Your internet dropped, or Trader Frame is briefly unreachable. It keeps trying.
Account
DU••••••• · paper
The account Gateway is logged into, paper or live.
Market data
Delayed (fine on paper; live entries need a CME real-time subscription in IBKR)
Quotes are 15 minutes old. Paper trades anyway.

Keeping it running

Day to day, and updating

The daily log-in

IB Gateway asks you to log in again once a day, and to re-authenticate fully once a week. Until you do, the account reads Needs your login and your bots pause. Stops already at IBKR stay in place.

Keep the window open

The Bridge works while its window is open and IB Gateway is logged in. Closing the window stops it; open it again and it reconnects with the token it remembered.

Updating the Bridge

When a newer Bridge is out, the account card on Brokers shows an Update link. Mac: download again and replace the app. Windows: run the new installer over the old one. Python: replace the folder and start it again. Your token and settings stay.

One Bridge per account

Run one Bridge for each IBKR account, on one computer. A second app on the same Gateway needs its own client id; the Python version sets it in bridge.json.

Troubleshooting

What a message means, and what to do

The Bridge window and the account card on Brokers tell you where the connection stops.

What you see
Why
What to do
Bridge: “Not reachable”
IB Gateway is closed, logged out, or its API is off.
Start Gateway, log in, and turn on the API (Configure › Settings › API).
Bridge: “Token rejected”
The token was copied wrong, or the account was disconnected.
Copy it again: Brokers › ⋯ › View Bridge token.
Bridge: “No answer from TraderFrame”
The computer lost its internet connection.
Check the connection. The Bridge keeps trying on its own.
The sheet says “nothing yet” after a minute
The Bridge is not running, or it is stuck on one of the lines above.
Open the Bridge window and read its four lines.
Windows: “unknown publisher”
Windows has not seen this installer often yet.
Choose More info, then Run anyway.
Linux: “Python 3 is not installed”
start.command needs Python 3 to build its environment.
Install Python 3 from python.org and run it again.
Account reads “Needs your login”
IB Gateway logged out for its daily restart.
Log in to Gateway. The Bridge reconnects on its own.
Limits
One Bridge per IBKR account, on one computer
Individual accounts only: not linked or advisor accounts
Mac app for Apple silicon; Intel Macs use the Python version

FAQ

TraderFrame Bridge questions

Does Trader Frame see my IBKR password?

No. You log in to IB Gateway yourself, with your two-factor. The Bridge holds only the Trader Frame token.

Does the Bridge trade on its own?

No. It places orders only for commands Trader Frame queued for your account, and reports every fill and close back, with the commission IBKR charged.

What does it send to Trader Frame?

Account values, positions and quotes every 15 seconds, plus one-minute bars for the contracts your bots trade, which the Trade Agent reads.

Can I run it on a server?

Yes, on any Windows or Linux machine that runs IB Gateway and stays on. The Bridge and Gateway must be on the same machine.

Is there an Intel Mac version?

The Mac app is for Apple silicon. On an Intel Mac, use the Python version.

Do I need a new Bridge for options?

No. The same Bridge runs futures and options bots; options need version 1.3.8 or newer. The IBKR options guide picks up from there.

Bridge online

Connected. Now build the bot.

With the account online, a futures or options bot is a few panels away. Both guides start where this one ends.