Broker connection

IBKR's own API only accepts connections from the same computer running your trading terminal (TWS) — there's no password field here because a website genuinely cannot log into IBKR on your behalf remotely. Instead, a small script (the "bridge agent") runs on your own computer, next to your already-logged-in TWS, and relays data to this app. This page is that script's profile: fill it in once here, then download its configuration below.

Linked: IBKR account U4349358

Last synced 2026-07-27 20:38:25 UTC

Broker profile

Run the bridge agent

Two steps, done once per computer:

  1. In TWS: File → Global Configuration → API → Settings — check "Enable ActiveX and Socket Clients", uncheck "Read-Only API" once you're ready to allow real order placement, and confirm the socket port matches what you saved above.
  2. On that same computer: pip install ibapi requests, download the configuration below into the same folder as bridge_agent.py as a file named .env, then run python bridge_agent.py.
Only needed if the token was ever exposed somewhere unsafe.

Once running, positions and live market data appear on your Portfolio page within about a poll interval.