• C#
  • Java
  • VB
  • C++
  • Python
Contact us
ActiveX for Excel API

The ActiveX API wraps the C#/.NET API and is provided as an open source project TWSLib. It is suggested to also consider using the C# API directly as it provides seamless integration with the .NET framework.

One possible advantage of using the ActiveX for Excel API as compared to RTDServer or DDE is that ActiveX does provide the same number of functions as the other socket-based technologies (C#, Java, C++, Python). Disadvantages of the ActiveX Excel API is that it is more difficult to program as compared to other Excel APIs and not as robust as non-Excel socket-based API applications.

See Excel API comparison

ActiveX Sample Spreadsheet

A sample ActiveX for Excel spreadsheet is included with the API installation and installs to C:\TWS API\samples\Excel\TwsActiveX.xls. The spreadsheet and the included ActiveX control are built for the 32 bit version of Excel for API versions until 973.05. With API versions 973.05+, the provided installed ActiveX control and Excel spreadsheet sample will work with either 32 bit or 64 bit applications. If version 9.73 of the ActiveX API is used, it is recommended to use version 973.07 or higher.

Important: Please note the sample ActiveX spreadsheet provided with the API is meant only as a demonstration of API functionality, and not intended as a production-level tool to be used in trading. While it is designed with examples of almost all API functions, it does not have the necessary functionality to handle problems that may occur during trading such as disconnections, error codes, or dropped events in a robust way.