This section provides the information of how to configure Cyan Spring ATS for Interactive Brokers connection.
Download Interactive Brokers TWS or Gateway here
Start up TWS/gateway and login with your account(you may want to login with a demo or paper trading account if you are first time playing with it). Change the API setting in TWS/gateway to "Enable ActiveX and socket clients".
<bean id="ibAdaptor" class="com.cyanspring.adaptor.ib.IbAdaptor"> <property name="host" value=""/> <property name="port" value="7496"/> <property name="clientId" value="1"/> <property name="logMarketData" value="false"/> </bean>
Host - Specify the host name of where you run IB TWS/Gateway. Leave it blank if you run Cyan Spring ATS server on the same host as IB TWS/Gateway.
Port - leave it to IB default 7496 unless you have changed it in IB TWS/Gateway settings.
Client Id - a unique client id for each connection.
IB TWS/Gateway requires the API to pass in contract information for each instrument/stock you want to trade. This is done in <installation dir>\server\refdata\refData_IB.xml.You may take a look at the existing data in this file to add your own.