Home Products Services About Us

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

  Home > Products > JASMIN > OSE Connectivity

JASMIN - OSE Connectivity

OSE2 Access Library Technical Overview


Contents 1. General

OSE2 Access Libraries family (OSE2Lib) represents a general interface to access Osaka Securities Exchange Trading System (OSE-TS). It is written in C++ and intended for use in any modern Unix environment. (Microsoft Windows port is also possible).

OSE2Lib encapsulates complexities of OSE-TS interconnection protocol, providing convenient interface for electronic trading.

OSE-TS system is logically divided into several system types, with each system type having separate data specification. OSE2Lib 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.

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

2. Design

Library contains a set of related C++ classes, logically separated into following categories:

3. Interface overview 3.1 Communication classes

Communication classes 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

IOSE2_SessionControl and IOSE2_SessionNotification are interfaces of Connection control interfaces category. IOSE2_SessionControl interface contains methods for session phase control, operation instructions management and statistics. IOSE2_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.

IOSE2_AUCTradeControl and IOSE2_AUCTradeNotification are interfaces of Data exchange interfaces category. IOSE2_AUCTradeControl is comprised of methods for composition and sending application level data such as different types of order data items. IOSE2_AUCTradeNotification is callback interface which delivers asynchronous events such as receipt, execute, result cancellation and correction notifications.

As mentioned before, OSE-TS uses separate logical lines as well as protocol definitions for different system types. IOSE2_AUCTradeControl and IOSE2_AUCTradeNotification are interfaces which cover specifics of data exchange with OSE Auction Trading System.

Connection control interfaces and Data exchange interfaces have been designed with idea of unification of differences between system types whenever possible. Thus Connection control interfaces may have single user-side entity for all system types, 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 OSE2_ApplicationStartRequest 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

OSE-TS system employs ASCII character subset format for transferring data frames between client and central system. Preparing the code for parsing and composition of such data 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_Data_Item frame:

As noted above, special exception classes are used to cover all format errors that can occur during frame composition to be sent 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 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 availability of the data from the OSE-TS 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 Unix like systems; 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

7. Licensing information

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

Contact Support Jobs