What API settings should I use in TWS?

Discuss, post your questions about TWSLink here.

Users who just registered, please write an email to
with your username mentioned.
So we can distinguish you from bots.
Thank you
Post Reply
Posts: 21
Joined: Sat Mar 03, 2018 9:23 am

What API settings should I use in TWS?

Post by Rocket130713 »


I have attached a screenshot of the TWS API settings I'm using for auto trading, are these settings correct and optimal? Also, what value should I enter for the "Master API client ID" setting in the TWS API settings? I'm using the following code for connecting to TWS and IB server "once" at TradeStation run-time:

ret_connect = CONNECT("",7496,1,1000);

Please see attachment below which shows all the TWS API settings I'm using. Would you recommend to change any of these settings?

Thank you in advance. Much appreciated.

Kind regards,

ScreenShot.png (193.75 KiB) Viewed 1264 times

Site Admin
Posts: 189
Joined: Mon Apr 24, 2017 3:24 pm

Re: What API settings should I use in TWS?

Post by board_admin »

The settings look fine. Perhaps check create API log. Sometimes it is useful to clarify problems.

- Read only unchecked is clear
- Download open orders on connection not required, because TWSLink does this anyway.
- DDE not required, since you do not use Excel with DDE connectio TWS.

if you want to connect to TWS or Gateway from another machine,
you need to uncheck
-Allow connection from localhost only

and to provide the IP of the machine from which you want to connect to TWS/Gateway.


The master API clientid is for API clients who wants to have control about orders from
all API clients and i guess, this includes TWS orders.

So, if you call

Code: Select all

you can get control about all orders.

If you connection with clientid=0, you have also control about orders placed in TWS.

Post Reply