Home Products Services About Us 日本語

TSE Arrowhead Connectivity Trading Simulators

JASMIN™ - TSE Arrowhead Connectivity

TSEAHDLIB Technical Overview


1. General
2. Design
3. Interface overview
4. Dependencies
5. Development environment
6. Available documentation
7. Licensing information

1. General

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

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

TSE system is logically divided into two system types, Order&Notice (AON) and Query(AQU), with each system type having separate data specification. TSEAHDLib follows this separation having separate binary and set of header files for every system type. In-spite of this, every effort is done to keep user-side interface generic and compatible as possible. The description below is for Order&Notice (AON) system.

This document highlights main features and structure of the library, leaving all technical details to Interface description document, which is available on request.

2. Design

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

  • Communication classes
  • Financial data representation classes
  • Event Manager
  • Optional event logger

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 and TSE_SessionNotification are interfaces of Connection control interfaces category. ITSE_SessionControl interface contains methods for session phase control, operation instructions management and statistics.TSE_SessionNotification is callback interface which has been introduced to allow library user to be notified about operations completion and other asynchronous events, since most of the operations have asynchronous nature.

ITSE_AONTradeControl and ITSE_AONTradeNotification are interfaces of Data exchange interfaces category. ITSE_AONTradeControl is comprised of methods for composition and sending application level data such as different types of order data items. ITSE_AONTradeNotification is callback interface which delivers asynchronous events such as acceptance, execution, result cancellation and modification notices.

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 modification notices.

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

TSEAHD 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 CNew_Order block:

  • inline CFrameWrapper::STSEAHDPrice get_Order_Price_AsSTSEAHDPrice() const throw();
    method returns current value of the price field. get_ methods never throw any exceptions, but assume that field consistency has been checked with check_() method.
  • inline void set_Order_Price_FromSTSEAHDPrice(CFrameWrapper::STSEAHDPrice _tsepValue) throw(CBlockException);
    method will assign supplied value to the field content. If supplied value is incorrect, exception is thrown.
  • inline void check_Order_Price() throw(CBlockException);
    Check method is used to validate the content of the field. If field's format does not obey original format specification, the exception, holding error code and identifier of the field, is thrown.

As noted above, special exception classes are used to cover all format errors that can occurduring frame composition and when just received frame is being parsed. This allows user codeto 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 character 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 compiled and tested under Red Hat Enterprise Linux 3 and 5 with GNU GCC compiler starting from version 3.2.3. Generally library can be successfully used with any C++ standard compliant compiler, however some compilers 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).

6. Available documentation

Library Interface Definition documentation for TSEAON and TSEAQU is available on request.The following documents are available online:

7. Licensing information

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

Contact Support Jobs