Skip to content

Multiple TWS Instances

If you have accounts that require separate TWS logins, you’ll need to run multiple TWS instances on different ports.

This applies when:

  • You have accounts under different IBKR logins
  • Each login requires its own TWS Desktop instance

Each TWS instance needs a unique port. Configure them in TWS:

TWS InstanceLoginPort
TWS #1user17496 (default)
TWS #2user27497
TWS #3user37495

In each TWS:

  1. Go to File > Global Configuration > API > Settings
  2. Set the Socket Port to 7496, 7497, 7495, etc.
  3. Click OK

See TWS Configuration for detailed setup with screenshots.

Add each account with its corresponding port:

Account IDAccount NameHostPortClient ID
U00000002KIDS_COLLEGElocalhost74961
U00000001IRA_1localhost74962
U00000003IRA_2localhost74963
U00000000INHERITED_ROTHlocalhost74964
U00000004GROWTHlocalhost74971
U00000005INCOMElocalhost74951

Rover multiple ports

  • Different ports for different TWS instances
  • Client IDs restart at 1 for each TWS instance
  • All TWS instances run on localhost
  1. Ensure all TWS instances are running and logged in
  2. Test each account connection in Rover
  3. Go to File > Save
  4. Click Start Account Analyzers

Click either of the Web UI buttons on Rover, or open any browser on your network and type the address shown on the button. For example: http://MyMachineName.local:5000

All accounts from all TWS instances are available. Select one, several, or all. Charts, metrics, quotes, tables and reports update based on your selection.

Multiple accounts across TWS instances in OptionsRealTime

Accounts from every TWS instance are listed together in the selector on the left, shown here by name and color-coded consistently across every view.

Multi-Machine Setup
Run OptionsRealTime on a different machine than TWS