|
|||
IB offers several alternatives for connecting directly to our trading system, including:
- A proprietary Application Program Interface (API) which operates through the Trader Workstation and does not require additional technical overhead such as a dedicated FIX server.
- An industry standard FIX solution for customers who can support a FIX Computer-to-Computer Interface (CTCI) infrastructure.
Our APIs are available for DDE for Excel, Java, C++, and ActiveX. For traders with little or no programming experience, we recommend the DDE for Excel platform, as Excel offers a familiar and user-friendly interface and the DDE API is seamlessly integrated into the Excel application. To help you get started with the TWS APIs, we invite you to attend our live API for Beginners webinar.
Our CTCI connection supports FIX versions 4.1 and 4.2, with support for selected 4.3, 4.4 and custom IB tags. See the CTCI FIX tab for more information.
Both solutions can connect through the internet, extranet, or a dedicated line. Click the Interface Comparison and Connection Comparision links above for more details.
http://www.interactivebrokers.com/en/p.php?f=api&p=comparison
| Features | TWS | API (Proprietary) | CTCI (FIX) |
| Description | A java-based electronic trading platform written by IB, available through a browser or as a standalone product. | An application programming interface that allows you to write custom applications that link to TWS using Java, C++, VB w/Active X, or DDE (Excel). | Computer-to-computer interface that uses FIX protocol, which allows you to use IB's order routing network to facilitate your own trading application or front-end. |
| Required Programming Expertise |
None | Intermediate to Expert | Expert |
| Supported Platforms | Windows, MAC, UNIX/Linux |
Windows - All APIs MAC, UNIX/Linux - Java API |
Windows, MAC, UNIX/Linux |
| Customer Access | Internet with secure login. | Internet with secure login through an active TWS session. |
|
| Supported Order Types | More than 40 different order types. Please refer to the Order Types page on our web site for a full list of all supported order types. |
Most of the TWS-supported order types. |
Most of the TWS-supported order types plus:
|
| Message limit per second | Depends on speed of manual entry | 50 | 150 |
| Method for placing orders | Manual | Proprietary API message | FIX message |
| Receive real-time portfolio update data? |
Yes | Yes | No |
| Receive real-time market data? |
Yes | Yes | Yes, via TWS API gateway client. |
| Sample application available? | N/A | Yes | No |
| Accessible from multiple IP addresses? |
Yes | Yes |
Internet - Yes Extranet and Dedicated Line - No |
| Built-in event/error logging | Yes | Yes | No, must program your own logging. |
| Advisor allocations | Yes | Yes |
Orders may only be sent to one account
at a time.
|
| Support |
Release Notes Users' Guide Customer Service Email: tac@interactivebrokers.com |
Software Release Notes API Users' Guide Email: api@interactivebrokers.com |
Individuals and Non-pro Advisors should send an email
to tac@interactivebrokers.com in
order to request CTCI integration. Pro Advisors, Institutions and Brokers should contact their sales representative for integration information. Integration can take up to one week. |
| Monthly Minimum Commissions |
Internet: $10.00 ($3 for age 25 and under) Extranet: $500.00 Dedicated Line: $500.00 VPN: $150.00 |
Same as TWS | Internet:
$100.00 $500.00 one-time setup fee. Extranet: $1,500.00 (line1) $1,000.00 (all subsequent lines) Dedicated Line: same as Extranet VPN: $150.00 $700.00 one-time setup fee |
http://www.interactivebrokers.com/en/p.php?f=api&p=comparison1
Connectivity
The IB API must use an Access Method (either TWS or the IB Gateway) before it can connect to the IB trading system through one of the available Connection Types described below.
If you prefer quick access to the latest production version, log in to the browser-based TWS or IB Gateway, which you access from the Login command on the menu above. If you prefer to upgrade manually to ensure that your API works with a specific version of TWS or the IB Gateway, download the standalone version(s) below to your desktop.
| Browser Based Logins | Standalone Downloads |
Browser Based IB Gateway |
IB Gateway for Windows |
|
Browser Based IB Gateway Beta
|
IB Gateway for UNIX |
IB Gateway for Mac |
Access Method Comparison
You can log into either interface at any time with no repercussions. You may want to use TWS for testing, and subsequently run the IB Gateway to conserve system resources. Both access methods are upgraded synchronously and provide the same features; the primary difference is that the IB Gateway has no graphical user interface (GUI).
| Feature | TWS | IB Gateway |
| Provides a GUI that allows you to see and manage API orders. | Yes | No |
| Must remain running to maintain access to IB trading system. | Yes | Yes |
| Can be logged in to from the IB web site Login menu (always latest version) or downloaded as a standalone version. | Yes | Yes |
| Can also be used as a connection interface for the FIX CTCI API. | No | Yes |
| GUI-less interface runs more efficiently and uses fewer system resources. | No | Yes |
Connection Types
Only one type of connection may be used for each account (account types with multiple accounts, such as advisors, may only have one connection type for all accounts). Switches in connection type can take up to a week.
| Connection Type | Access Method Required? |
Description |
| Internet | Yes | Standard connection through public internet. |
| Extranet | Yes | A T1 line routed to one of IB's extranet providers, Radianz TNS or Savvis. They route directly to IB over a secure private line. |
| Dedicated Line | Yes | Client pays for a T1 line that connects directly to one of IB's Data Centers, which are located throughout the world. A dedicated lease line connects users directly into the IB system and facilitates a quicker and more secure connection than a regular Internet line. |
For monthly minimums per connection type, see the Required Minimums page, Connection Minimums
Individuals and Non-pro advisors who require Extranet, VPN, Dedicated Line, or CTCI integration should send a request to tac@interactivebrokers.com. Pro Advisors, Institutions, and Brokers requiring integration should contact their sales representative. Integration can take up to a week.
http://www.interactivebrokers.com/en/p.php?f=api&p=comparison2
IB API Software
Program traders may build their own add-on applications in Excel (using DDE or ActiveX), C++, Posix C++, Java, and Visual Basic with our proprietary IB Application Program Interface (API), which requires connectivity via either the TWS or the IB Gateway. We encourage API users to test their API components with their PaperTrader or the TWS Demo System before actually implementing any new API systems.
| Windows | Windows Beta | MAC/UNIX | MAC/UNIX Beta | |||
| Software | Download latest version | Download beta version | Download and Installation Instructions for MAC | Download and Installation Instructions for UNIX | Download and Installation Instructions for MAC | Download and Installation Instructions for UNIX |
| Downgrade to previous version | ||||||
| Release Date |
|
|
|
Apr 02 2012 | ||
| Version |
|
|
|
API beta 9.67 | ||
| Special Notes | Includes the C++ Socket, Java Socket, DDE, Active X APIs,
and sample code for each. |
Includes the Java Socket API, Posix C++ Socket API and sample code for each. |
||||
| Support | API Reference Guide or IB Discussion Forum. | |||||
As a reminder, the use of the IB API as a means of disseminating information, including market data or any other licensed or copyrighted information, to third parties or non-registered IB customers is strictly prohibited without prior written approval of Interactive Brokers.
http://www.interactivebrokers.com/en/p.php?f=api&p=api
The API Getting Started series provides an introduction to the TWS APIs, and is written for programmers who are interested in learning about the functions and features of our API platforms. These publications do not teach programming languages, but are designed to guide the programmer through the basics of the TWS API sample applications.
For information on the TWS API platforms, see the API Release Notes, the API Reference Guide, and register for our live API webinars.
Getting Started with the TWS DDE for Excel API book explores the most user-friendly of the API-supported platform. It is written for non-programmers who have some trading knowledge and are comfortable with Microsoft Excel®. This book walks you step-by-step through downloading the API software and sample spreadsheet, connecting to TWS, and accessing the task-specific Excel tabs.
The DDE for Excel API Quick Reference provides an overview of the DDE for Excel API.
| Getting Started with the TWS DDE for Excel API | |
| Getting Started with the TWS DDE for Excel API for Advisors | |
| DDE for Excel API Quick Reference |
Getting Started with the TWS Java API walks you through our Java API and the Java API sample application. In order to get the most out of this book, you should have some experience with the Java programming language.
The Java API Quick Reference provides an overview of the TWS Java API.
| Java API Quick Reference | |
| Getting Started with the TWS Java API | |
| Getting Started with the TWS Java API for Advisors | |
| Java API Samples for the Getting Started Guide | ![]() |
Getting Started with the TWS ActiveX API walks you through our ActiveX API and the ActiveX API sample application. In order to get the most out of this book, you should have some experience with the Visual Basic programming language.
The ActiveX Quick Reference provides an overview of the TWS ActiveX for Visual Basic / VB.NET API.
| ActiveX API Quick Reference | |
| Getting Started with the TWS ActiveX API | |
| Getting Started with the TWS ActiveX API for Advisors |
Getting Started with the TWS C++ API walks you through our C++ API and the C++ API sample application. In order to get the most out of this book, you should have experience with the C++ programming language.
The C++ API Quick Reference provides an overview of the TWS C++ API.
| C++ API Quick Reference | |
| Getting Started with the TWS C++ API | |
| Getting Started with the TWS C++ API for Advisors |
Sun, the Sun logo, Sun Microsystems, Java, and all Java-related trademarks are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. Microsoft Excel is a registered trademark of Microsoft Corporation in the United States and/or other countries.
http://www.interactivebrokers.com/en/p.php?f=api&p=api1
API Reference Guide
Use the online version of the Reference Guide to take advantage of the index and other navigational features, and to print individual topics. Use the printable version to print multiple topics or the complete API Users’ Guide.
Online Reference Guide |
Printable Reference Guide |
http://www.interactivebrokers.com/en/p.php?f=api&p=api2
API Release Notes
Click on a build number or topic in the table to access the associated Release Notes. Notes for the most recent build are listed first.
http://www.interactivebrokers.com/en/p.php?f=api&p=api3
API Beta Notes
The modifications below are in build 9.67 of the TWS API.
For clarification on any of the items listed, refer to the appropriate section in the API Reference Guide, or send us an email at Beta Support.
The Java, ActiveX, and C++ APIs can now receive a list of contract identifiers that the customer is allowed to view (CUSIP, ISIN, etc.) This is made possible by a new attribute in Contract Details, secIDList.
The Java, ActiveX, and C++ APIs now let you specify per-leg combo prices. To support this feature, we've added a new object called OrderComboLeg, which contains a single attribute, price (double); and a new attribute called OrderComboLegList. OrderComboLeg contains order-specific per-leg attributes while OrderComboLegList holds the attributes for all legs.
The API also receives the Contract::comboLegs vector and comboLegsDescription string. Note that the order in which the legs are received from TWS in the openOrder message could be different from what was originally submitted; however, the order of Contract::comboLegs and Order::orderComboLegs vector elements will be consistent.
You can now track commissions in the Java, ActiveX, and C++ APIs using the new callback commissionReport( ), which contains the parameter CommissionReport, which is a new object. The new CommissionReport object contains the following attributes:
- commission (double)
- currency (string)
- execId (string)
- realizedPNL (double)
- yield (double)
- yieldRedemptionDate (integer) - takes the YYYYMMDD format.
A new field, trailingPercent (double), has been added to orders in the ActiveX, C++ and Java APIs. You can now specify the trailing amount of a trailing stop order as a percentage, the same as a user can do in TWS.
Observe the following guidelines when using the trailingPercent field:
- This field is mutually exclusive with the existing trailing amount. That is, the API client can send one or the other but not both.
- This field is read AFTER the stop price (barrier price) as follows:
- deltaNeutralAuxPrice
- stopPrice
- trailingPercent
- scale order attributes
- The field will also be sent to the API in the openOrder message if the API client version is >= 56. It is sent after the stopPrice field as follows.
- stopPrice
- trailingPct
- basisPoint
This enhancement requires TWS server version 62.
Our ActiveX, C++ and Java API's now support extended scale orders. The following fields have been added to an order:
- double scalePriceAdjustValue
- int scalePriceAdjustInterval
- double scaleProfitOffset
- bool scaleAutoReset
- int scaleInitPosition
- int scaleInitFillQty
- bool scaleRandomPercent
© 2001 - 2012 Interactive Brokers LLC. All rights reserved. Sun, Sun Microsystems, the Sun Logo and Java are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. Excel is a trademark or registered trademark of Microsoft Corporation in the United States and/or other countries.
http://www.interactivebrokers.com/en/p.php?f=api&p=api4
Connectivity
FIX CTCI customers who access the IB trading system via the public Internet must use the IB Gateway access method. The IB Gateway can also be used to deliver market data to FIX CTCI customers, using the same protocols as the IB API. To find the Request Market Data API method click here. Once integration has been completed, you can run the IB Gateway software from the Login menu on the IB web site (always the latest version), or via the downloaded, standalone version below.
Standalone Downloads
|
IB Gateway for Windows
IB Gateway 9.66 • Release Notes
Standalone IB Gateway requires that you download the latest version from the IB web site whenever you need to upgrade. Runs from your PC. |
IB Gateway for UNIX
IB Gateway • Release Notes
Standalone IB Gateway for UNIX requires that you download the latest version from the IB web site whenever you need to upgrade. Runs from your PC. |
Connection Types
Only one connection type may be used for each account (account types with multiple accounts, such as advisors, may only have one connection type for all accounts). Switching the connection type may take up to one week.
| Connection Type | Description |
| Internet | Standard connection through public internet. Requires IB Gateway connection interface. |
| Extranet | A T1 line routed to one of IB's extranet providers, Radianz TNS or Savvis. They route directly to IB over a secure private line. |
| VPN | IB supports a dedicated Virtual Private Network (VPN) tunnel from the client's data center directly to one of IB's Data Centers. A VPN provides a secure method of connecting over the public Internet without the need to maintain a dedicated leased line or extranet connection. Unlike the IB Gateway client, the VPN does not require daily manual authentication. |
| Dedicated Line | Client pays for a T1 line that connects directly to one of IB's Data Centers, which are located throughout the world. A dedicated lease line connects users directly into the IB system and facilitates a quicker and more secure connection than a regular Internet line. |
| For monthly minimums per connection type, see the Required Minimums page, Connection Minimums tab. | |
Professional Advisors, Funds, Trading Groups, and Brokers requiring integration should contact their sales representative. Individuals and Non-Professional advisors who require CTCI integration should send a request to tac@interactivebrokers.com. Integration can take up to one week.
http://www.interactivebrokers.com/en/p.php?f=api&p=ctci
IB Gateway for FIX Users' Guide
Use the IB Gateway Guide if you are using the CTCI over the Internet.
CTCI Users' Guide Disclaimer
I understand that the Interactive Brokers ("IB") CTCI-FIX Specification that I have requested contains confidential and proprietary information of IB and I agree that I will not disclose such information to any third parties or use such confidential information personally except for purposes of opening an IB account and trading through the IB system. I understand that all other uses or disclosures of the information is prohibited and could cause irreparable harm to IB.
http://www.interactivebrokers.com/en/p.php?f=api&p=ctci1






