Home Products Services About Us

TSE connectivity TSE Arrowhead connectivity Trading Simulators
Jigsaw Jigsaw Mobile JASMIN Servers

  Home > Products > JASMIN > TSE Connectivity

JASMIN - TSE Connectivity

TSELIB Technical Overview


Contents 1. General

TSE Access Libraries family (TSELib) represents a general interface to access TSE trading system. It is written in C++ and intended for use in any modern Unix environment. (Microsoft Windows port is also possible)

TSELib encapsulates complexities of TSE interconnection protocol, providing convenient interface for electronic trading.

TSE system is logically divided into several markets, with each market having separate connection and data specification. TSELib follows this separation having separate binary and set of header files for every market. In-spite of this, every effort is done to keep user-side interface generic and compatible as possible.

This document highlights main features and structure of the library, leaving all technical details to Interface description document, that can be found at Available documents section.

2. Design

Library comprises framework of related C++ classes, divided into following categories:

3. Interface overview

3.1 Communication interfaces

Communication interfaces are responsible for all system interconnection activity: data link establishment, logical session activation and protocol support. Access to these functionality is based on concept of interfaces, which has to be acquired from the library. Generally there are two categories of interfaces: Connection control interfaces and Data exchange interfaces.

ITSE_SessionControl falls into the first category, and it contains methods for session phase control, operating instructions management and statistics. Since most of the operations have asynchronous nature, callback interfaces have been introduced to allow library user to be notified about operations completion and other async events.

Data exchange interfaces are comprised of methods for sending application level data such as different types of orders and corresponding callback interfaces deliver asynchronous events such as trades, cancel and revision notifications.

As mentioned before, TSE system uses separate logical lines as well as protocol definitions for different markets. Connection control and Data exchange interfaces have been designed with idea of unification of differences between markets whenever possible. Thus Connection control interface has single user-side entity for all markets, while actual implementation differs. Data exchange interfaces were much more difficult to unify, because of natural differences between instruments being traded. But still static polymorphism of C++ can be employed to write generic algorithms for controlling high-level data exchange.

Callback interfaces are pure abstract classes, that should be implemented by client code. Callback interfaces together with communication classes obey the following important rule: invocation of a method in one of communication classes will never result in synchronous callback invocation. For example implementation of the TSE_EstablishSession method does not invoke any callback, so client code does not need to care about possible re-entrance. On the other side, implementation of callback interface is free to call any of the library interface methods.

3.2 Financial data representation classes

TSE system employs binary format for transferring data between client and central system. Preparing the code for parsing and composition of such frames is usually time-consuming process. To simplify this, library represents such frames as classes with several access methods for every field. Following example illustrates this approach for single Order_Price field of COrder_New block:

As noted above, special exception classes are used to cover all format errors that can occur during frame composition and when just received frame is being parsed. This allows user code to be written as try/catch protected blocks and the code inside does not need to care about possible errors.

To summarize: communication infrastructure uses financial data representation classes as wrapper for raw binary data. Library user may choose whether to use these classes or manipulate directly with raw buffers.

3.3 Event Manager

Event Manager is an object, hiding main loop of the application. Internally it is based on select/poll system calls to support I/O multiplexing. In addition, it provides a convenient way to manage application timers and certain functionality for safe way of controlling Unix signals.

Event Manager used by communication classes for controlling availability of the data from the TSE as well as resolving write queue congestions. Event manager can be overridden by client code if needed, provided that current interface is preserved.

3.4 Event logger

Event logger provides convenient way to dump status information into the log file. This is an optional component, so if it is not provided to communication classes, they will not produce any output.

Event logger component defines abstract interface and it can be implemented arbitrarily by client code if necessary.

4. Dependencies

Library implementation does not require any specific functionality from the operating system. It is based on socket API to get access to Transport level of TCP/IP stack. Conforming interface is available in most of modern Unixes; Winsock port is also possible.

Internal dependencies are noticed above: Event Manager and Event logger. Usually any application has similar objects, so adapters can be developed for seamless integration.

5. Development environment

Library has been developed and tested in Solaris operating environment using SUNPro 6U2 family of compilers. Various gcc versions starting from 2.95.3 were used for source code conformance testing and cross-compilation. Generally library can be successfully used with any C++ standard compliant compiler, however any compilers outside mentioned above may require additional testing and possibly source code tweaking. Basically we provide static libraries, cause some compilers releases cannot generate proper code for throwing exceptions from dynamic libraries, hence shared object configuration is not yet possible(ex: gcc). Indeed, safe dynamic libraries can be compiled using Sun's C++ compiler, however due different ABI used by different C++ compilers, mix of libraries is not possible.

6. Available documentation

7. Licensing information

If you're interested in this library, please contact us:

Contact Support Jobs