OnixS ICE iMpact Multicast Price Feed Handler C++ library 8.18.0
Users' manual and API documentation
Loading...
Searching...
No Matches
Connectivity Configuration

How to get the latest version of connectivity configuration files?

The latest version of connectivity configuration files is available on our site.

Connectivity Configuration Structure

All public constructors of Handler accept the path to the connectivity configuration file as the primary parameter. This file contains definitions of multicast groups and the network addresses of corresponding servers to which the Handler must connect to receive market data.

There are three major sections which make up the configuration: TCP connection information, Multicast groups, and Market types.

Shared Connection Settings

The Handler supports automatic reconnect for TCP connections and provides the following settings:

  • timeoutInMilliseconds - the time interval in milliseconds to determine if data is not available in the TCP stream.
  • reconnectTimeoutInSeconds - when a reconnect occurs, this timeout (in seconds) is used to delay the next connection. ICE requires new connections to be established at least 15 seconds after the last successful connection.
  • maximumNumberOfReconnectAttempts - maximum number of reconnect attempts. If you want to reconnect until the connection is established please use -1. If you don't want to reconnect at all, please use 0.

The settings above can be specified in the connectivity configuration:

<tcp>
<settings>
<timeoutInMilliseconds>20000</timeoutInMilliseconds>
<reconnectTimeoutInSeconds>16</reconnectTimeoutInSeconds>
<maximumNumberOfReconnectAttempts>0</maximumNumberOfReconnectAttempts>
</settings>
</tcp>

Also, you can specify TCP settings using the Handler::setTcpSettings method:

HandlerSettings settings;
// Configure `settings` instance...
// Create the Handler instance.
Handler handler(settings);
// Modify the TCP settings.
TcpSettings tcpSettings = handler.getTcpSettings();
tcpSettings.timeoutInMilliseconds = 20000;
tcpSettings.reconnectTimeoutInSeconds = 16;
// Apply the custom TCP settings to the Handler.
handler.setTcpSettings(tcpSettings);

TCP Connection Information

The TCP connection information section defines attributes of the remote system to which the Handler must connect to request primary information, such as product definitions for selected markets. This section also defines login information, such as username and password, that the Handler must supply to succeed with requests.

Typical TCP connection information section looks like the following:

<tcp>
<server name="ICE">
<ip>63.247.113.163</ip>
<port>3000</port>
<userName>Username from ICE</userName>
<password>Password from ICE</password>
<getStripInfoMessages>N</getStripInfoMessages>
<strategyPreference>New</strategyPreference>
<localNetworkInterface>eth0</localNetworkInterface>
<sslEnabled>Y</sslEnabled>
</server>
</tcp>

Values of ip and port attributes define the connection to the remote system. userName and password are the logon-related attributes.

getStripInfoMessages is a flag indicating whether the client wants to receive Strip Info Messages. Y or N. It is N by default.

sslEnabled is used to enable or disable SSL for TCP connections to the ICE server. By default, SSL is enabled for Non-Production and disabled for Production.

How To Specify Username And Password Using API?

If you don't want to store username and password in the connectivity configuration file, please use the Handler's API. For example:

// Create the Handler settings and specify config file.
HandlerSettings settings;
"ConnectivityConfiguration.AP1.xml";
// When the Handler is created, `TcpSettings` object is created as well
// from the data in the connectivity configuration file.
// You can keep username and password empty in the config file.
Handler handler(settings);
// Now you can set username and password for a TCP server.
handler.setTcpServerCredentials("ICE", "username", "password");

The <userName> and <password> elements may be left empty or omitted entirely from the <server> entry. The <server> entry itself, including its name attribute, must still be present in the configuration file, since Handler::setTcpServerCredentials() looks the server up by name and throws if it is not found.

Note
The credentials supplied via Handler::setTcpServerCredentials() (or in the configuration file) are retained by the Handler for its entire lifetime, not only until the initial login completes. They are reused on every automatic reconnect to re-authenticate the TCP session.

Defining Multicast Groups

The Multicast groups section defines addresses of Multicast Price Feed channels for different types of books for a particular multicast group. The example below shows how a single entry has to be defined:

<multicast>
<group name="ICE Futures US Agricultures">
<fullOrderDepth>
<live ip="233.156.208.255" port="20001"/>
<snapshot ip="233.156.208.254" port="20002"/>
</fullOrderDepth>
<priceLevel>
<live ip="233.156.208.253" port="20003"/>
<snapshot ip="233.156.208.252" port="20004"/>
</priceLevel>
</group>
</multicast>

Each group entry defines connection parameters for each book type defined by the ICE iMpact specification. Therefore, the connectivity configuration requires two entries in each group entry: fullOrderDepth and priceLevel. In turn, each such entry must contain live and snapshot sub-entries that define connection information for the corresponding Multicast Price Feed channel.

Market Types

Finally, the Market types section defines the correspondence between multicast groups and the market types that comprise each group. For instance, ICE Futures Europe Oil group includes IPE Gas Oil Futures, IPE Brent Future, IPE Gas Oil Futures Crack, and other market types.

The following sample depicts how association can be defined:

<allMarketTypes>
<marketType code="4" multicastGroup="ICE Futures Europe Oil">
IPE Gas Oil Futures
</marketType>
<marketType code="5" multicastGroup="ICE Futures Europe Oil">
IPE Brent Futures
</marketType>
<marketType code="6" multicastGroup="ICE Futures Europe Oil">
IPE Gas Oil Futures Crack
</marketType>
</allMarketTypes>

Typical Connectivity Configuration

Generally, a basic configuration file looks like the following:

<?xml version="1.0" encoding="utf-8"?>
<!--
This file contains the configuration information for
various deployment environments. The TCP and Multicast
Group addresses are pre-configured so we can choose a
configuration during the launch of the multicast client
application
Within the multicast tag, we have different multicast
groups named as "ICE Futures US Agricultures" etc., Each
of these groups, then, have information on the context
for which the client might be interested in subscribing
to. These are under FullOrderDepth/TOP5PL tags. They,
in turn, contain the live and snapshot multicast group
addresses.
-->
<connectivityConfiguration>
<!-- TCP Connection Information -->
<tcp
ip="63.247.113.163"
port="3000"
userName="Value from ICE Support"
password="Value from ICE Support"
getStripInfoMessages="N"
localNetworkInterface=""
/>
<!-- Multicast Groups Information -->
<multicast>
<group name="ICE Futures US (Liffe) Metals">
<fullOrderDepth>
<live ip="233.156.208.232" port="21231"/>
<snapshot ip="233.156.208.232" port="21230"/>
</fullOrderDepth>
<top5pl>
<live ip="233.156.208.232" port="21229"/>
<snapshot ip="233.156.208.232" port="21228"/>
</top5pl>
<fullOrderDepth implied="true">
<live ip="233.156.208.232" port="21199"/>
<snapshot ip="233.156.208.232" port="21198"/>
</fullOrderDepth>
<top5pl implied="true">
<live ip="233.156.208.232" port="21197"/>
<snapshot ip="233.156.208.232" port="21196"/>
</top5pl>
</group>
<group name="ICE Futures US (Liffe) Equity Indices">
<fullOrderDepth>
<live ip="233.156.208.232" port="21227"/>
<snapshot ip="233.156.208.232" port="21226"/>
</fullOrderDepth>
<top5pl>
<live ip="233.156.208.232" port="21225"/>
<snapshot ip="233.156.208.232" port="21224"/>
</top5pl>
</group>
<!-- Options -->
<group name="ICE Futures US (Liffe) Options">
<top10pl>
<live ip="233.156.208.232" port="21187"/>
<snapshot ip="233.156.208.232" port="21186"/>
</top10pl>
<topOfBook>
<live ip="233.156.208.232" port="21185"/>
<snapshot ip="233.156.208.232" port="21184"/>
</topOfBook>
</group>
</multicast>
<!--
List of all market types with their corresponding
multicast groups The multicast group name must match
what has been specified in the multicast tag More than
one market type may be mapped to a multicast group
channel Refer to the spec document, Section Appendix C:
Supported Market Types
-->
<allMarketTypes>
<marketType
code="206"
multicastGroup="ICE Futures US (Liffe) Metals"
optionsMulticastGroup="ICE Futures US (Liffe) Options"
>
Metals
</marketType>
<marketType
code="207"
multicastGroup="ICE Futures US (Liffe) Equity Indices"
optionsMulticastGroup="ICE Futures US (Liffe) Options"
>
IFUS Equity Indices
</marketType>
</allMarketTypes>
</connectivityConfiguration>