Install-Configure: IB API and Gateway

IB's Official API Reference Guide

Interactive Brokers (IB) has published an excellent API Reference Guide that provides official and most-updated information on its TWS based Trading API. You can find it useful because our sample Excel spreadsheet (twsATSXL.xls) here is built on top of IB's sample TwsActiveX.xls, directly utilizing many of its worksheets and functions.

You can access Interactive Brokers' API Reference Guide here.

The information from this API Reference Guide is relevant to our twsATSXL, specifically the chapter Overview, DDE for Excel, and Reference are helpful.

Important Tips:
#1 - If you would like to make the most use of twsATSXL, please spend some more time on charpter DDE for Excel, which provides detailed information on these worksheets: Account, Tickers, Basic Orders, Open Orders, Executions, Portfolio. These worksheets can be easily used for manual trading with twsATSXL.

#2 - In addition, for (Semi-)Automated Trading with twsATSXL, Basic Orders Worksheet is particularly important because your trading strategy (or tranding plan) will control orders on this worksheet.

Download and Install IB TWS

Follow instructions here from Interactive Brokers website.
Note that current IB TWS installation package includes IB Gateway.

Download and Install IB API

Following instrunctions here from Interactive Brokers website. After accept its agreement, choose "IB API for Windows", download and install this package.

Configure IB Gateway

(You may refer to Interactive Brokers' API Reference Guide here for more details if needed.)

You will get similar screen when you log onto IB Gateway successfully (with the same IB Account and Credentials):

Click Configure on the top of IB Gateway window and make sure the following highlighted fields have desired value: