Port for Paper Trading TWS is now 7497


#1

This is just a heads up for IBC users using Paper Trading account. Interactive Brokers changed they default port number of paper trading accounts as per: https://www.interactivebrokers.com/en/index.php?f=15912

Default production port: 7496 (as before)
Default paper trading port: 7497

The assigned default API ports for production and paper accounts are now different to allow both accounts to run at the same time. Production port is still 7496 and paper port is now 7497. These ports are automatically assigned when TWS is installed or reinstalled. Likewise, IB Gateway users will see the change of default ports for paper go from 4001 to 4002, leaving 4001 for the production version.


#2

Hi. I have configured the following:

  1. My Database is configured to use IB Gateway 4001
  2. IB Gateway is configured to use port 4001
  3. When I start up IB Gateway, I log into the my PAPER account and it informs me that I am using a PAPER Account.

QUESTION: Why would I need to change my port to “match” the PAPER port (4002) to my PAPER login?

Please advise. Thanks


#3

Because TWS developers decided so?


#4

Hmmm…

I thought this was going to be simple. In order to access the paper trade IB account

in IBController.ini, I changed

ForceTwsApiPort=

to

ForceTwsApiPort=7497

But no connection.

Only by resetting IB Gateway thus:

IBGateway > settings > socket port = 7496

could I get a connection.

Have I missed something?


#5

I think you should contact Interactive Brokers as nobody here is able to fix errors inside TWS API / TWS / Gateway. These are written by IB.