Introduction

After clients connect with Interactive Brokers, many find that they would like to integrate with Interactive Brokers’ API offerings. This might be to automate trading, exploring alternative graphical interfaces, or perhaps to build connections for other users. In this guide, we will look to explore what is offered by Interactive Brokers, what might not be available, and details on how to get started with each implementation.

Web-Based APIs

The APIs listed below are focused on users that wish to make web requests to receive data rather than maintain data through desktop requests. This will also include information such as reporting details, creating accounts, and additional utility beyond simple trading.

Client Portal Web API

Interactive Brokers’ Client Portal Web API offers clients the ability to communicate directly with IBKR infrastructure, both synchronously using RESTful HTTP endpoints and in an asynchronous, event-driven manner via websocket. A variety of authorization and authentication methods are available to accommodate any use case, including OAuth 1.0a, OAuth 2.0, SSO, and our Java-based CP Gateway tool.

All IBKR client types and account structures are supported by its broad feature set, from individuals and enterprise clients to institutional organizations and financial advisors. Moreover, because the Client Portal Web API is built on standard web technologies, it is also the ideal tool for third-party financial technology firms seeking to offer their custom software products to Interactive Brokers’ vast, international client base.

CPAPI Documentation

OAuth

While the underlying functionality will remain the same, OAuth allows users another form of authentication rather than using the Client Portal Gateway portal. This means that clients can run our system without any head or need for 2-factor authentication as the OAuth 1.0A workflow will accomplish this process for them.

Trader Type: Institutions, including: Financial Advisors, Hedge Funds, and Third Party Software Developers

Important:

OAuth is exclusively available for organization or institutional clients. This includes Financial Advisors, Hedge Funds, Introducing Brokers, and Third Party platform developers.

OAuth Documentation

Digital Account Management (DAM)

Financial Advisors with Interactive Brokers often require a means of onboarding new clients without the need to direct them back and forth through Interactive Brokers’ Client Portal. So in an effort to better support our advisors, the Digital Account Management, or DAM, implementation has been created for advisors to create users, facilitate funding, and manage account systems seamlessly via API.

DAM enables advisors to also develop applications for their sub-accounts through the use of SSO Tokens. The SSO Token enables access for portfolio details, allowing end users to view account information without directly impacting the advisor’s trading.

It is important to note that Digital Account Management can be used in tandem with TWS API development, CPAPI development, or FIX implementations. Advisors are also welcome to use the Trader Workstation for their allocation management, and only use DAM as a means to create accounts.

DAM Documentation

Flex Web Service

Flex Web Services are a connection method that allows users to retrieve pre-configured statements from Interactive Brokers without the need to log in to the Client Portal. This means clients can retrieve daily trade reports or daily position information programmatically to receive reports of interest. After the Flex Web Queries are first created in the Client Portal, customers can retrieve the reports with two simple requests.

Flex Web Services makes HTML requests over the internet to retrieve xml formatted reports.

Trader Type: All clients

Flex Web Service Documentation

Financial Information eXchange (FIX)

In addition to our standard APIs, Interactive Brokers also offers our customers the option for a direct FIX integration, allowing trades be submitted directly using the standard FIX protocol. For users unfamiliar with the FIX standard, please visit https://www.fixtrading.org/what-is-fix/.

Trader Type: Professional Traders, Organizations, or Institutions.

Getting Started With FIX

Third Party Services

For some customers, Trading with Interactive Brokers is the preferred option, but in some cases users may not prefer our existing platforms, nor do they have an interest in coding their own software. In these cases, customers may benefit from using Third Party Services or Software to accomplish their trading needs. For example, some customers may wish to trade futures with a more chart oriented approach, or with a platform more emphatic around Futures than what is currently offered by Trader Workstation. In situations like this, customers may find a platform that better supports their visual needs while still holding funds and receiving commission rates through Interactive Brokers.

Third Party Services can connect via Client Portal API, FIX, or Trader Workstation API.

Trader Types: Retail traders, Professional traders

Third Party Connections

Trader Workstation API

Interactive Brokers’ flagship platform, the Trader Workstation, is equipped with it’s own API offering the majority of its feature set through an API built for fast paced, data intensive, and complex trading. The asynchronous TWS API library is built to handle a large data sets for hundreds or potentially thousands of market data lines streaming simultaneously while outputting trades in tandem. Given the platform is equipped with the Trader Workstations’ capabilities, we have nearly full parity with the functionality, order type access, and market data access you may be used to. This can be further extended with the less demanding IB Gateway, as the removal of unused graphical elements from automated trading can allow more resources be dedicated to your unique programs.

The TWS API is built using a TCP Socket connection, and is available in Python, Java, C++, C#*, and VB.NET*.

The TWS API is intended for: Retail traders, Professional Traders, Financial Advisors, and Third Party Platform developers.

*C# and VB.net are only available for Windows PC.

TWS API Documentation

Excel APIs

Interactive Brokers also offers an array of Excel-based APIs built around the underlying TWS API. This makes for a more visually appealing workspace for those that prefer a data table presentation rather than fully automated workflows. The Excel API still institutes the same functionality as TWS API including the order types, order conditioning, and market data availability.

The Excel API is built with a DDE, ActiveX, or RTD connection onto the TCP Socket connection facilitated by the standard TWSAPI.

While the existing Excel functionality can be programmed with VB.NET, the underlying connection and request behavior is handled in Java for DDE, or C# for ActiveX and RTD.

Trader Types: Retail traders, Professional Traders

ActiveX

Interactive Brokers’ offers three unique variants of Excel connectivity. ActiveX offers the full functionality of the TWS API with a 1 second market data refresh rate. Implementing the ActiveX variant will require users to implement some level of VB .NET as the cell assignment can not be done completely through the use of something like an Excel Macro.

ActiveX is built using a combination of VB .NET and C#.

ActiveX Documentation

DDE

Interactive Brokers’ offers three unique variants of Excel connectivity. DDE offers the full functionality of the TWS API with a 250 ms market data refresh rate. Implementing the DDE variant allows users the full functionality of the TWS API but with access to Excel Macros for a less programming-intensive implementation.

DDE is built using a combination of VB .NET and Java.

DDE Documentation

RTD

Interactive Brokers’ offers three unique variants of Excel connectivity. RTD offers a more restricted connection structure that is built around the use of requesting real time market data. As such, the RTD variant is built around the intake of larger market data requests without effecting Excel’s performance. The implementation allows for a 250 ms market data refresh.

RTD is built using a combination of VB .NET and C#.

RTD Documentation