82 lines
14 KiB
HTML
82 lines
14 KiB
HTML
<!-- HTML header for doxygen 1.8.11-->
|
|
<!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 C++ CME Market Data Handler: Pages/MarketByOrder.md Source File</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"/>
|
|
<script type="text/javascript">
|
|
$(window).scroll(function() {
|
|
if ($(this).scrollTop() > 1)
|
|
{
|
|
$('header').addClass("sticky");
|
|
}
|
|
else
|
|
{
|
|
$('header').removeClass("sticky");
|
|
}
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<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.svg"/></a></td>
|
|
<td style="padding-left: 0.5em;">
|
|
<div id="projectname">OnixS C++ CME Market Data Handler
|
|
 <span id="projectnumber">4.8.0.10</span>
|
|
</div>
|
|
<div id="projectbrief">API documentation</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</header>
|
|
<div id="wrapper">
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.8.11 -->
|
|
<div id="navrow1" class="tabs">
|
|
<ul class="tablist">
|
|
<li><a href="index.html"><span>Home</span></a></li>
|
|
<li><a href="modules.html"><span>Contents</span></a></li>
|
|
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li class="current"><a href="files.html"><span>Files</span></a></li>
|
|
</ul>
|
|
</div>
|
|
<div id="navrow2" class="tabs2">
|
|
<ul class="tablist">
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div><!-- top -->
|
|
<div class="header">
|
|
<div class="headertitle">
|
|
<div class="title">Pages/MarketByOrder.md</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<a href="MarketByOrder_8md.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> \addtogroup market-by-order</div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> </div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> \brief Details of Market By Order (MBO) functionality support. </div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> </div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> Starting with Q4 2016, CME MDP exposes Market By Order (MBO) functionality </div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> with current Market By Price (MBP) functionality. MBO disseminates individual </div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> orders and quotes at every price level for a particular instrument. MBO </div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> functionality is embedded into existing market events and channels. </div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> </div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> \section mbo-support API Classes and Members Implementing MBO Functionality</div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> </div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> The SDK API was enhanced with new classes, listeners and methods to expose </div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> the new functionality to the users and provide them with the same experience </div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> as they have while working with MBP books. </div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> </div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> The SDK exposes the new class OnixS::CME::MDH::MboBook representing </div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> MBO book. The design and interface of the new class is similar to the </div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> classes encapsulating MBP books like the OnixS::CME::MDH::DirectBook. </div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> In particular, this class provides access to bids and offers for the </div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> given instrument with the help of OnixS::CME::MDH::MboBook::bids and </div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> OnixS::CME::MDH::MboBook::asks members respectively. All bids and asks </div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> are sorted in the same way as price levels in the MBP books. </div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> The OnixS::CME::MDH::Order class encapsulates bids and offers. It </div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> exposes order primary details like id, priority, price and display </div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> quantity. In contrast to MBP books, MBO book may contain multiple </div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> entries having the same price value. Orders with the same price are </div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> sorted by priority starting from the lowest to highest no matter </div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> whether a single order is representing bid or offer.</div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> To get subscribed to MBO book updates, it's necessary to </div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> override OnixS::CME:MDP3::SecurityListener::onBookUpdate </div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> member of OnixS::CME:MDP3::SecurityListener and bind instance </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> of listener to the instance of OnixS::CME::MDH::Handler class </div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> using OnixS::CME::MDH::Handler::registerSecurityListener.</div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> Also, the correspondent Handler's parameter defines </div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> whether to maintain MBO order books: </div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> </div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> ~~~{.cpp}</div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> handlerSettings.bookManagement().mboBooks().maintain(true);</div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> </div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> ~~~</div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> \note Currently, the SDK exposes different book update notification </div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> strategies. By default, books of each type (direct, implied, etc) </div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> are delivered to the user at the end of the corresponding market event (see </div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> \ref book-update-notification-strategies and OnixS::CME::MDH::EventListener</div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> for more information). CME MDP uses the same 'End Of Real Quotes' event to </div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> define the end of MBO and direct book update transactions. Therefore, MBO </div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> books updates are triggered at the same time points as MBP direct books are. </div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div><div class="line"><a name="l00053"></a><span class="lineno"> 53</span> \section mbo-book-maintenance Accurate MBO Book Maintenance and Natural Refresh for MBO Books</div><div class="line"><a name="l00054"></a><span class="lineno"> 54</span> </div><div class="line"><a name="l00055"></a><span class="lineno"> 55</span> The Handler supports both accurate maintenance and natural refresh </div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span> for MBO books. Users should not experience any difference in MBP and </div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span> MBO order book maintenance. </div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span> </div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> \note Classes implementing price levels in MBP books (like the </div><div class="line"><a name="l00060"></a><span class="lineno"> 60</span> OnixS::CME::MDH::DirectPriceLevel) have a member identifying </div><div class="line"><a name="l00061"></a><span class="lineno"> 61</span> whether level data is available when books are naturally </div><div class="line"><a name="l00062"></a><span class="lineno"> 62</span> refreshed. In case of MBO books, there's no such attribute.</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span> All orders are placed one by one in a defined order. </div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span> </div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span> \section mbo-and-mbp-recovery Market State Recovery for MBO books</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span> </div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span> In case of late join or data loss, the Handler performs </div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span> a large-scale market state recovery using snapshot feeds. </div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span> </div><div class="line"><a name="l00070"></a><span class="lineno"> 70</span> In contrast to real-time updates, when data for all kind of books is </div><div class="line"><a name="l00071"></a><span class="lineno"> 71</span> transmitted using the same incremental feed, the recovery from snapshots </div><div class="line"><a name="l00072"></a><span class="lineno"> 72</span> uses separate 'snapshot MBO' feeds. Therefore, the Handler uses the corresponding </div><div class="line"><a name="l00073"></a><span class="lineno"> 73</span> snapshot feeds for particular book types when the recovery is performed.</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span> Therefore, Handler processes market data from two sources (regular and </div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span> MBO snapshot feeds), if the users are subscribed to both MBO and MBP books. </div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span> An important aspect is the fact of performing two recovery procedures </div><div class="line"><a name="l00077"></a><span class="lineno"> 77</span> for MBP and MBO books may cause increase time of overall recovery since</div><div class="line"><a name="l00078"></a><span class="lineno"> 78</span> the Handler has to wait until the end of both procedures before switching </div><div class="line"><a name="l00079"></a><span class="lineno"> 79</span> to real-time data processing. </div><div class="line"><a name="l00080"></a><span class="lineno"> 80</span> </div><div class="line"><a name="l00081"></a><span class="lineno"> 81</span> \note Both MBP and MBO recovery feeds transmit recent trades and </div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span> latest statistics. The Handler raises events for trades and statistics </div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span> taken from snapshots for MBP books, if both MBP and MBO recovery sources </div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> are used. Users, who're interested in having statistics and top of MBP </div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span> book sent in snapshots for MBO book, may consider listening to market </div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span> data messages using OnixS::CME::MDH::MessageProcessingListener to have </div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span> MBO snapshot data for their needs.</div></div><!-- fragment --></div><!-- contents -->
|
|
<!-- HTML footer for doxygen 1.8.11-->
|
|
<!-- start footer part -->
|
|
<footer>
|
|
<hr class="footer"/>
|
|
<address class="footer">
|
|
<small>© <a href="http://www.onixs.biz">Onix Solutions [On<span class="corporate-orange">i</span>x<span class="corporate-orange">S</span>]</a>. All rights reserved.</small>
|
|
</address>
|
|
</footer>
|
|
</div> <!-- wrapper -->
|
|
</body>
|
|
</html>
|