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
What API settings should I use in TWS?
-
- Posts: 21
- Joined: Sat Mar 03, 2018 9:23 am
What API settings should I use in TWS?
- Attachments
-
- ScreenShot.png (193.75 KiB) Viewed 10440 times
-
- Site Admin
- Posts: 244
- Joined: Mon Apr 24, 2017 3:24 pm
Re: What API settings should I use in TWS?
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
you can get control about all orders.
If you connection with clientid=0, you have also control about orders placed in TWS.
- 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)
If you connection with clientid=0, you have also control about orders placed in TWS.