The TIBCO StreamBase® Adapter for CME Order Routing allows a StreamBase application to connect to iLink, the CME Globex order entry interface, to enter, modify and cancel orders, and to receive order and fill confirmations.
The adapter is comprised of two operators: one Input operator to receive incoming FIX messages from CME and one Output operator to send FIX messages to CME. Both operators are meant to work as a matched set, sharing a FIX session with the counterpart. Multiple pairs can be used to connect to different hosts, for example, to access multiple market segments in one application.
The CME Order Routing adapter provides the following services:
-
Connects to a CME iLink Convenience Gateway or Market Segment Gateway server.
-
Performs start of week, mid-week and in-session logons using CME's secure logon procedure.
-
Exchanges FIX messages with the server.
-
Automatically fails over to a backup server (if configured) according to the CME Market Segment Gateway procedures.
To connect to CME servers, the iLink adapter uses the services of the High Performance FIX engine, a high-speed, low-latency engine derived from the B2Bits Antenna FIX engine from EPAM Systems. A separate license and download is required to use this FIX engine — see your TIBCO representative for details.
Note
Use of the High Performance FIX engine is based on a license agreement between TIBCO StreamBase and EPAM B2Bits that renews every two years. Be aware that production deployments of StreamBase applications that use StreamBaseFIX will need to be upgraded at least once every two years to take advantage of the latest license period. This might require updating your StreamBase release version.
In order to share a FIX session, an Input and Output operator pair must be configured to point to the same FIX session definition, as shown in Configuration below. You can define multiple sessions and use different sets of the adapter operators to connect to them simultaneously.
These sections list the name and usage of each property setting for both operators.
Name: Use this required field to specify or change the component's name, which must be unique in the current module. The name must contain only alphabetic characters, numbers, and underscores, and no hyphens or other special characters. The first character must be alphabetic or an underscore.
Adapter: A read-only field that shows the formal name of the adapter.
Class name: Shows the fully qualified class name that implements the functionality of this adapter. If you need to reference this class name elsewhere in your application, you can right-click this field and select Copy from the context menu to place the full class name in the system clipboard.
Start with application: If this field is set to Yes (default) or to a module parameter that evaluates to true
, this instance of this adapter starts as part of the JVM engine that runs this EventFlow fragment. If this field is set to
No or to a module parameter that evaluates to false
, the adapter instance is loaded with the engine, but does not start until you send an epadmin container resume command (or its sbadmin equivalent), or until you start the component with StreamBase Manager.
Enable Error Output Port: Select this check box to add an Error Port to this component. In the EventFlow canvas, the Error Port shows as a red output port, always the last port for the component. See Using Error Ports to learn about Error Ports.
Description: Optionally enter text to briefly describe the component's purpose and function. In the EventFlow canvas, you can see the description by pressing Ctrl while the component's tooltip is displayed.
This section describes the Adapter Properties tab for the Input and Output operators.
- FIX Session Definition
-
StreamSQL name: sessionDefinitionID
Default: none
REQUIRED SETTING. Identifies the name of the session definition (found in the
sbd.sbonf
configuration file) to which to connect. - Log Level
-
StreamSQL name: logLevel
Default:
INFO
Controls the level of verbosity the adapter uses to send notifications to the console. This setting can be higher than the containing application's log level. If set lower, the system log level will be used. Available values, in increasing order of verbosity, are: OFF, ERROR, WARN, INFO, DEBUG, TRACE, and ALL.
Use the Concurrency tab to specify parallel regions for this instance of this component, or multiplicity options, or both. The Concurrency tab settings are described in Concurrency Options, and dispatch styles are described in Dispatch Styles.
Caution
Concurrency settings are not suitable for every application, and using these settings requires a thorough analysis of your application. For details, see Execution Order and Concurrency, which includes important guidelines for using the concurrency options.
The Input operator has one input port to allow applications to send commands such as connect, disconnect, etc.
The schema for this port is expected to contain the following fields:
Field Name | Field Type | Field Description |
---|---|---|
Command |
string | Always required. Should contain the name of the command to execute. Possible values include:
|
Param1 |
string | Required for SetSequenceNumbers commands, optional for Connect command, and ignored for all others. Connect command: Should contain one of SetSequenceNumbers command: Should contain the desired sequence number for the next incoming FIX message. Set to -1 to leave this sequence number unchanged. |
Param2 |
string | Only required for SetSequenceNumbers command, optional for Connect command, and ignored for all others. Connect command: When using SetSequenceNumbers command: Should contain the desired sequence number for the next outgoing FIX message. Set to -1 to leave this sequence number unchanged. |
The Input operator has a seven output ports: one for each of the possible business-level FIX messages sent by CME, one for all session-level messages (such as Logon, Logout, etc) and one to communicate status events (errors, connections, results of commands, and so on).
Ports 1 through 5 emit business-level messages as they are received from CME. The ports are:
-
ExecutionReport (msgtype="8") messages
-
OrderCancelReject (msgtype="9") messages
-
SecurityDefinition (msgtype="d") messages
-
QuoteAcknowledge/QuoteCancelAcknowledge (msgtype="b") messages
-
MassActionReport (msgtype="BZ") messages
The schema for these business-level message ports is set according to the schemas defined by CME. Each field in the schema is the direct equivalent of the incoming message's field of the same name.
All admin-level messages are routed to the sixth port. Its schema includes every field of every such message types (Logon, Logout, Reject, and so on).
Finally, the seventh port is the Status port and has the following schema:
Field Name | Field Type | Description |
---|---|---|
status | string | Describes this event. Possible values can include: Connected , Disconnected , Error .
|
info | list<string> | This is an all-purpose field used to convey additional information describing this event. For example, in the case of an Error event this will contain the text describing the error.
|
The Output operator has one input port to receive business-level FIX messages to be sent to CME, and one output port to communicate status events.
The input port is expected to contain fields named after their FIX message counterparts (MsgType, Symbol, BidPrice, etc). TIBCO recommends using schema that is a union of all possible fields for all possible business-level messages that can be sent to CME (or a subset thereof). Only one field is mandatory: a string field named MsgType, to indicate the type of message represented by the current tuple. Set all other fields according to CME's rules of engagement for this message type or left null if they correspond to another message type.
As of this writing, CME supports the following message types that can be sent from the client to its server:
-
NewOrder (msgtype="D")
-
OrderCancelRequest (msgtype="F")
-
OrderCancelReplaceRequest (msgtype="G")
-
OrderStatusRequest (msgtype="H")
-
QuoteRequest (msgtype="R")
-
SecurityDefinitionRequest (msgtype="c")
-
NewOrderCross (msgtype="s")
-
MassQuote (msgtype="i")
-
QuoteCancel (msgtype="Z")
-
OrderMassStatusRequest (msgtype="AF")
-
OrderMassActionRequest (msgtype="CA")
Note
Other than the MsgType field, there is no need to specify any header fields for the outgoing messages; these are automatically filled out by the operator before the message is sent.
Note
It will be convenient to launch the Schema FIX Designer and select CMEOrderRoutingQFJDictionary.xml
dictionary to generate a schema that includes all the fields needed for the desired messages. See FIX Adapter for details on how to use the FIX Schema Designer.
The Input and Output operators share a connection to the same FIX session, provided they are configured to do so. Each operator
lists the sessions available in a drop-down box (see FIX Session Definition). The list's values are specified in a dedicated section of the application's adapter-configurations.xml
file. Here is an example of such a section, containing all supported settings (long lines wrap to the next, for clarity):
<adapter-configurations> <adapter-configuration name="cme-ilink"> <section name="session-definition"> <!-- Market Segment Gateway session --> <setting name="id" val="Test MSGW Session" /> <setting name="host" val="69.50.112.183" /> <!-- Segment 70 (Commodity Futures) --> <setting name="port" val="62896" /> <!-- Leave 'backup-host' empty to disable failover support --> <setting name="backup-host" val="69.50.112.182" /> <!-- Segment 70 Secondary IP --> <setting name="backup-port" val="62896" /> <!-- Use this if your system uses multiple NICs <setting name="network-interface" val="10.249.81.194"/> --> <!-- 'true' to use Convenience Gateway, 'false' to use Market Segment Gateway --> <setting name="use-convenience-gateway" val="false" /> <setting name="sender-comp-id" val="UFT004U" /> <setting name="target-comp-id" val="CME" /> <!-- Always 'CME' --> <setting name="sender-location-id" val="US,MA,Massachusetts" /> <setting name="sender-sub-id" val="StreamBase" /> <setting name="target-sub-id" val="70" /> <!-- Match value of tag 1300-MarketSegmentID of SecurityDefinition messages --> <setting name="application-system-name" val="StreamBase" /> <setting name="trading-system-version" val="7.7.3" /> <setting name="application-system-vendor" val="TIBCO" /> <!-- CME-provided access keys for secure logon --> <setting name="access-keys-file" val="cmeKeys.txt" /> </section> <!-- Convenience Gateway session --> <section name="session-definition"> <setting name="id" val="Test CGW Session" /> <setting name="host" val="69.50.112.139" /> <setting name="port" val="27770" /> <!-- Use this if your system uses multiple NICs <setting name="network-interface" val="10.249.81.194"/> --> <!-- 'true' to use Convenience Gateway, 'false' to use Market Segment Gateway --> <setting name="use-convenience-gateway" val="true" /> <setting name="sender-comp-id" val="J42004N" /> <setting name="target-comp-id" val="CME" /> <!-- Always 'CME' --> <setting name="sender-location-id" val="US,MA,Massachusetts" /> <setting name="sender-sub-id" val="StreamBase" /> <setting name="target-sub-id" val="G" /> <setting name="application-system-name" val="StreamBase" /> <setting name="trading-system-version" val="7.7.3" /> <setting name="application-system-vendor" val="TIBCO" /> <!-- CME-provided access keys for secure logon --> <setting name="access-keys-file" val="cmeKeys.txt" /> </section> <!-- Other session definitions go here --> </adapter-configuration> </adapter-configurations>
A best practice is to define your sessions before placing operator instances on the canvas, so that the lists are already available in the Properties view and the operators can be configured right away.