What API settings should I use in TWS?

Discuss, post your questions about TWSLink here.

Users who just registered, please write an email to
forum@trade-commander.de
with your username mentioned.
So we can distinguish you from bots.
Thank you
Post Reply
Rocket130713
Posts: 20
Joined: Sat Mar 03, 2018 9:23 am

What API settings should I use in TWS?

Post by Rocket130713 » Thu Mar 22, 2018 10:53 am

Hello,

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,

Rod
Attachments
ScreenShot.png
ScreenShot.png (193.75 KiB) Viewed 292 times

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

Re: What API settings should I use in TWS?

Post by board_admin » Thu Mar 22, 2018 2:09 pm

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

CONNECT("",port,master_id,100)
you can get control about all orders.

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

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests