Click or drag to resize

Getting Started

This topic contains the following sections:

This document outlines how to use the T4 API 4.7. The API consists of a set of objects in a Microsoft .Net Framework DLL and is included within the 4.7+ version Simulator client install available here.

Getting Started

To develop to the API you need a development tool that fully supports Microsoft .Net Framework 4.7, such as Microsoft Visual Studio .Net 2017. To assist development we have a simulator system that provides market depth and execution 24x5, regardless of real market hours. From the API’s perspective the simulator works exactly the same as the live system.

Note Note

At this time the T4 API is in Microsoft .Net Framework 4.7. You should ensure that you have the latest Service Packs and hotfixes for Framework installed.

Note Note

Attempting to connect to the system via any other method than through the T4API is not allowed.

Important note Important

Do NOT parse, build, or predict unique identifiers of any system object or message. If you question your implementation please contact and we would be happy to explain. Unique identifier formats can change at any time. Many are based off data provided by the exchange. Examples would be Market.MarketID and Contract.ContractID.

Note Note

It is recommended to all developers that they begin their work in the Simulation environment and thoroughly test their applications before moving to the Live environment.

System Access

In the early stages of development we ask that developers make use of the license provided in our examples. This allows access to some Dummy markets so that you can subscribe for quotes and submit orders. To access real markets, such as the CME, you have to request a Simulation license code.

To request production live and/or Simulator license codes please provide the following information to YOUR CLEARING FIRM. Your clearing firm is then required to provide with their informal approval and the details you have provided.

Live Firm

The live firm used as part of user authentication.

Live Users

All Live users that require access to this application. Configuration of Live users will be completed by your broker or FCM. CTS is not permitted to configure Live users.

Sim Firm

The Simulation firm used as part of user authentication.

Sim Users

All Simulation users that require access to this application.


Name of your application. This needs to be unique across our system so it should be prefixed with your company initials or similar. Please do not include "T4" or "CTS" or "Cunningham" in your application name.


Name of the developer or person responsible for the application.


Email address for the developer


Phone number for the developer

You will then be provided with a license code that your application will need to use every time it logs in. Please note that the license code will be different for the Live and Simulator systems.

Note Note

If you are creating multiple applications then you MUST request a license for each application.

Important note Important

If your application causes the system problems (e.g. excessive load) then we may be forced to disable it. We will endeavour to contact you before doing so.

We strongly encourage developers to create a single application to satisfy all of their needs. Same as our front-end sits on a single instance of the API and yet offers many different types of functionality. Running multiple applications increases bandwidth usage and overall overhead on our system.

Enabling an Application

Enabling a T4 application license and having it assigned to a user:

  1. A user must have their firm T4 administrator add a T4 license (by name) to their T4 userid.

  2. User asks their firm to have access to "XY_GenericApp".

    1. If the firm has "XY_GenericApp" in their list the T4 admin assigns it to the T4 user and the user is ready to login.

    2. If the firm does not have "XY_GenericApp" in their list they (the firm administrator) must make an informal request via email to along the lines of: "Hey guys can you please add XY_GenericApp to our firm so that I can assign it to a user." We will add the license and notify the firm.

  3. The firm will then assign "XY_GenericApp" to the T4 user and the end user is notified by the firm T4 administrator. Generally not by CTS unless requested by the firm.

Example Projects

There are several example projects that are installed with the Simulator frontend. All the example projects were created in Visual Studio 2010. You can access these examples from the C:\users\"your windows user"\documents\ T4 API Examples shortcut.


This is a basic example showing login, account and market subscription and order submission.


More complicated example in VB.


More complicated example in C#.


Shows a simple market picker and market subscription.


How to access the API from c++.


This shows how you can get historical chart data.


This shows how you can get historical chart data using the ChartDataAPI.


This shows how you can login additional users within a session for order routing.


This shows how to use the API from within a Windows Service.

Our API Examples run out of the box because we ensure the correct dependency files are referenced by the example project.

  1. Install the latest version of Sim. The CTS T4 installer determines whether the user’s system is 32 or 64 bit. One could choose to install live but then the post build events would need to be updated as well to point to the appropriate install folder. Keep in mind these build events are not required. As a developer you can do without so long as you manually distribute the appropriate dependencies. The most important thing to keep in mind if using the post build events is that they point to a valid directory.

  2. Set your project Target CPU to AnyCPU so you don’t run into issues where they are compiling 32bit but the dependencies they are copying are 64bit.

  • copy "C:\Program Files\CTS\T4ClientSim\bin\System.Data.SQLite.40.DLL" "$(TargetDir)"

  • copy "C:\Program Files\CTS\T4ClientSim\bin\zlib1.dll" "$(TargetDir)"

  • copy "C:\Program Files\CTS\T4ClientSim\bin\Newtonsoft.Json.dll" "$(TargetDir)"

  • copy "C:\Program Files\CTS\T4ClientSim\bin\t4connection.47.dll" "$(TargetDir)"

  • copy "C:\Program Files\CTS\T4ClientSim\bin\t4message.47.dll" "$(TargetDir)"

  • copy "C:\Program Files\CTS\T4ClientSim\bin\t4tracelistener.47.dll" "$(TargetDir)"

File Dependencies

The T4 API requires the following files to be in the same folder as your executable:

  • T4Definitions.47.dll

  • T4API.47.dll

  • T4Connection.47.dll

  • T4Message.47.dll

  • T4TraceListener.47.dll

  • Newtonsoft.Json.dll

  • Zlib1.dll - Note: There are different versions of this file installed depending on whether your system is x64 or x86.

  • System.Data.SQLite.40.DLL - Note: There are different versions of this file installed depending on whether your system is x64 or x86.

Important note Important

T4 requires at least .Net Framework 4.7 to be installed.