Interactive Brokers updates TWS API
The TWS API now provides a DDE Socket Bridge API.
Online trading major Interactive Brokers Group, Inc. (IEX:IBKR) has recently released an updated version of the TWS API.
The TWS API now provides a DDE Socket Bridge API. This feature adds the same functionality included in Interactive Brokers’ socket-based APIs to the DDE API, so DDE users now have access to many features not previously available, including daily open price, multiple account data subscriptions and more. In addition, it is backwards-compatible with earlier DDE syntax and worksheets.
The Dynamic Data Exchange protocol is a method of inter-process communication developed by Microsoft to establish communication between Windows applications running on the same computer. The DDE API is available for Windows computers to create a means of communication between Microsoft Excel and TWS or IB Gateway.
Interactive Brokers does not offer any programming assistance and therefore it is recommended to anyone considering using any of the TWS DDE API to become familiar with the technologies involved such as the DDE protocol and VBA.
Beginning in API v975, a new DDE API is offered which connects to TWS via a DDE socket bridge that uses the open source Java – DDE interoperability library JDDE. The newer API has some advantages over the legacy DDE API:
- Compatibility with either 32 or 64 bit TWS (The legacy DDE API is only compatible with 32 bit TWS);
- Additional functionality matching other socket-based APIs, especially in regards to multiple account structures’
- Full range of market data tick types.
Unlike in the legacy DDE API, the username to be used in Excel DDE spreadsheets is determined by the DDE server launched independently, and not by the username used in TWS. The default username is twsserver, but this can be changed in the runDdeSocketBridge.bat file. The folder C:\TWS API\samples\DdeSocketBridge included with the API for Windows v975+ installation contains the source code for the new DDE connections.
You can find out more about the new API here.
The latest API release also offers new fields in Market Depth Requests. A primary exchange field has been added to market depth requests to prevent ambiguity for Smart-routed depth requests.