65 lines
5.4 KiB
HTML
65 lines
5.4 KiB
HTML
<!-- HTML header for doxygen 1.8.7-->
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
|
<meta name="generator" content="Doxygen 1.8.11"/>
|
|
<title>OnixS ICE iMpact Multicast Feed Handler for C++: Subscribing to multicast groups</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="onixs-doxygen.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<header>
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectlogo"><a href="http://www.onixs.biz"><img alt="Logo" src="onixs.gif"/></a></td>
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">OnixS ICE iMpact Multicast Feed Handler for C++
|
|
 <span id="projectnumber">3.13.0.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</header>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.11 -->
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li class="current"><a href="modules.html"><span>Modules</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">Subscribing to multicast groups<div class="ingroups"><a class="el" href="group__getting_started.html">Getting Started</a></div></div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<h1><a class="anchor" id="subscriptionCreation"></a>
|
|
Creating a subscription</h1>
|
|
<p>The ICE iMpact multicast groups are currently defined based on set of products (such as 'Europe Futures Oil') and depth of book (Full Order Depth, Top 5 Price Level). The Handler exposes flexibility of subscribing to the multicast groups that are best suited to customers individual needs.</p>
|
|
<p>Subscribing is a way to start receiving Multicast Price Feed market data. To subscribe to certain multicast groups as well as to select which type of books must be maintained by the Handler, instance of OnixS::ICE::iMpact::MarketData::MarketSubscriptions collection must be created and filled with items.</p>
|
|
<p>Once instance of a blank collection is created, subscriptions for a particular market type can be added. This can be achieved by pushing items of type <a class="el" href="struct_onix_s_1_1_i_c_e_1_1i_mpact_1_1_market_data_1_1_market_subscription.html" title="Defines which books should be maintained for given market type id. ">OnixS::ICE::iMpact::MarketData::MarketSubscription</a> into the collection. Each added item identifies type of market to which subscription will be performed and kinds of books which the Handler is supposed to build and update while maintaining subscription.</p>
|
|
<h1><a class="anchor" id="subscriptionStart"></a>
|
|
Starting a subscription</h1>
|
|
<p>Afterwards, constructed collection must be passed to <a class="el" href="class_onix_s_1_1_i_c_e_1_1i_mpact_1_1_market_data_1_1_handler.html#aecfeb158f2b3d60cbe8773f819b4caeb" title="Subscribes to the given market. ">OnixS::ICE::iMpact::MarketData::Handler::start</a> member which causes the Handler to receive and process data for the markets specified in the subscription. Since that moment, Handler will notify about all the events through appropriate listeners. In particular, it will notify the subscribes about reception of the product definitions. Later, about changes in states of markets, new orders added or removed to or from market books, and, surely, about errors if any occurred during processing data from Multicast Price Feed channels.</p>
|
|
<h1><a class="anchor" id="subscriptionExample"></a>
|
|
Example</h1>
|
|
<p>Below is the example of creating subscription for 'IPE Brent Futures' market of 'ICE Futures Brent' multicast group:</p>
|
|
<div class="fragment"><div class="line">HandlerSettings handlerSettings;</div><div class="line"></div><div class="line">handlerSettings.connectivityConfiguration = <span class="stringliteral">"ConnectivityConfiguration.APITest.xml"</span></div><div class="line"></div><div class="line">Handler handler(handlerSettings);</div><div class="line"> </div><div class="line">MarketSubscriptions subscriptions;</div><div class="line"></div><div class="line">MarketSubscription brentFutures(</div><div class="line"> 5, <span class="comment">// Market type id for IPE Brent Futures.</span></div><div class="line"> SecurityTypes::Futures, <span class="comment">// Defines type of securities (Futures/OTC, Options or UDS Markets)</span></div><div class="line"> BookDepth::TOP5PL <span class="comment">// Build and maintain Top5PL book.</span></div><div class="line">);</div><div class="line"></div><div class="line">subscriptions.push_back(brentFutures);</div><div class="line"></div><div class="line">handler.start(subscriptions);</div></div><!-- fragment --> </div><!-- contents -->
|
|
</ul>
|
|
<hr class="footer"/><address class="footer"><small>© <a href="http://www.onixs.biz">Onix Solutions [OnixS]</a>. All rights reserved.</small></address>
|
|
</div>
|
|
</body>
|
|
</html>
|