Introduction to Trading Components

About Trading Components Framework

This documentation describes the procedure to include StreamBase Trading Components in applications you create that can monitor foreign exchange (FX) markets and execute trades at FX venues. It also describes the commands, schemas, properties and constant values used within the framework's modules.

Note

The Trading Components Framework was initially released as an optional component in earlier releases of StreamBase and is now integrated into StreamBase Studio. For information on recent changes and updates, see StreamBase Release Notes and New and Noteworthy.

At the highest level, the Trading Components Framework packages its modules into two types of venue-specific handlers:

Market Data Handlers

Modules that access streaming market currency exchange data.

Execution Handlers

Modules that communicate trades with execution venues.

TIBCO has made building FX applications around the handlers as standardized as possible, by providing common port configurations, schemas, and properties. As protocols vary among FX venues, separate handlers are provided for each one. Generally, all you need to do is to provide necessary credentials to connect to venues, and then configure currencies, sides, tenors and other options that you normally need to specify.

The following section describes how to access and start to configure handlers within a StreamBase application. Market data handlers are available for about a dozen venues, and execution handlers are included for most of them. See Supported Venues for a complete list. All adapter properties are parameterized, enabling you to set component properties (generally those of FIX adapters) by setting module parameters, with little need to edit configuration files beyond providing required credentials. Also, a set of common schemas that all handlers use standardize data fields within applications and enable them to transparently communicate with different venues.

Accessing Trading Components

The Trading Components Framework is installed with StreamBase and is available in StreamBase Studio by default.

You load Market Data handlers and trade execution handlers separately for each venue you want to access in an application. The Trading Components palette tray has a Market Data Handler icon and an Execution Handler icon, as shown in this list view:

To add a handler for a venue to a StreamBase application, drag the appropriate icon to the canvas. A wizard opens for you to choose a handler, similar to the way you add a Java operator or adapter to a project. The following example shows the selection of a Gain GTX Market Data handler.

Clicking Finish includes the selected handler with default configuration file entries and values. Clicking Next allows you to edit the default configuration file name and key properties, as shown below for the Gain GTX Market Data handler.

Clicking Finish presents the module at the location you dragged it to with its label selected. It is good practice to provide a name in that field to identify this instance of the handler. Hovering over the module displays a tooltip describing required connections, as the following illustration shows.

Hovering over a port symbol displays the port number, its role, and its expected schema, as shown below for the first input and output ports of the Gain market data handler.

For handlers that reference shared tables, hovering on the connector along the top displays information about how tables are configured, as shown below.

Note

Your application may not require that all ports be connected.

Each handler is a module containing components that do not require configuration or modification. For example, the Gain GTX Market Data handler shown above is implemented with four levels of modules. The top level module is shown below to illustrate.

Important

You need not and should not modify the internals of Trading Component handlers.

Learning from Trading Component Sample Applications

Trading Components provide uniform interfaces across all handlers. Samples are provided that illustrate how to configure them into a variety of applications. There are two samples for each Trading Component venue, one for accessing market data and another for executing trades.

Access the samples through FileLoad StreamBase Sample, and then twist open the Trading Components section at the bottom of the Load StreamBase Samples dialog to see all the samples. Double-click one of the entries, or select it and click OK. When you load any of the samples, StreamBase Studio automatically loads Trading Components if you have not done so previously.

Many samples come with emulators that supply fictitious market data, and thus do not require connections to live data feeds to run. However, you do need to configure certain properties for most samples, such has credentials and socket connection.

The samples that include market data emulators are:

The Global Quotes sample goes beyond the others to blend market data for two venues, illustrating how to configure multiple market data handlers to interleave quotes from different venues and then sort and query them as a group.

As an example, the following illustration shows the Currenex trading components market data sample application.

This application utilizes the prepackaged Trading Components module CurrenexMarketData.sbapp, and provides logic to subscribe to the (emulated) Currenex venue and then to unsubscribe after a set number of messages have been received (specified by the module parameter ${MaxMessages}).