|
From: Øyvind M. W. <oyv...@om...> - 2018-06-27 10:31:30
|
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<p>All inbound application level messages are passed to
Application.fromApp. Note that FIX messages are asynchronous;
there is no guarantee from the protocol when a response for your
MarketDataRequest is returned.<br>
</p>
<p><a class="moz-txt-link-freetext" href="https://www.quickfixj.org/usermanual/2.0.0//usage/application.html">https://www.quickfixj.org/usermanual/2.0.0//usage/application.html</a></p>
<p>You have to implement the Application interface and register it
in your acceptor as in the example on the page above.<br>
</p>
<p><br>
</p>
<div class="moz-signature">
<title></title>
<font face="Verdana"><small>Best regards<br>
<br>
<b><font color="#003366">Øyvind Matheson Wergeland</font></b><br>
CTO</small><br>
<small>
<br>
Mobile: (+47) 95 16 16 88<br>
E-mail: <a class="moz-txt-link-abbreviated" href="mailto:oyv...@om...">oyv...@om...</a><br>
<br>
<b><font color="#003366">Oslo Market Solutions</font></b><br>
PO Box 4, 0051 Oslo, Norway<br>
Telephone: (+47) 40 00 23 13<br>
<a class="moz-txt-link-abbreviated" href="http://www.oms.no">www.oms.no</a></small><br>
</font>
</div>
<div class="moz-cite-prefix">On 06/27/2018 11:25 AM, Vamsi
Pinnamaneni wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAF...@ma...">
<pre wrap="">QuickFIX/J Documentation: <a class="moz-txt-link-freetext" href="http://www.quickfixj.org/documentation/">http://www.quickfixj.org/documentation/</a>
QuickFIX/J Support: <a class="moz-txt-link-freetext" href="http://www.quickfixj.org/support/">http://www.quickfixj.org/support/</a>
</pre>
<!--'"--><br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<div dir="ltr">I am using following code
<div><br>
</div>
<div>
<div> public static void sendMarketDataRequest(SessionID
sessionId) </div>
<div><span style="white-space:pre"> </span>throws
SessionNotFound {</div>
<div><span style="white-space:pre"> </span>System.out.println("sending
request........");</div>
<div><span style="white-space:pre"> </span>// We generate a
new request ID</div>
<div><span style="white-space:pre"> </span>MDReqID reqId =
new MDReqID("MDRQ-" +
String.valueOf(System.currentTimeMillis()));</div>
<div><br>
</div>
<div><span style="white-space:pre"> </span>// We want
EUR/XBT data</div>
<div><span style="white-space:pre"> </span>String
currencyPair = "USD/VND";</div>
<div><br>
</div>
<div><span style="white-space:pre"> </span>// We want to get
a snapshot and also subscribe to the market depth updates</div>
<div><span style="white-space:pre"> </span>SubscriptionRequestType
subscriptionType = new
SubscriptionRequestType(SubscriptionRequestType.SNAPSHOT);</div>
<div><br>
</div>
<div><span style="white-space:pre"> </span>// We want the
full book here, not just the top</div>
<div><span style="white-space:pre"> </span>MarketDepth
depthType = new MarketDepth(1);</div>
<div><br>
</div>
<div><span style="white-space:pre"> </span>// We'll want
only incremental refreshes when new data is available</div>
<div><span style="white-space:pre"> </span>MDUpdateType
updateType = new MDUpdateType(MDUpdateType.FULL_REFRESH);</div>
<div><br>
</div>
<div><span style="white-space:pre"> </span>MarketDataRequest
mdr = new MarketDataRequest(reqId, subscriptionType,
depthType);</div>
<div><br>
</div>
<div><span style="white-space:pre"> </span>mdr.setField(updateType);</div>
<div><br>
</div>
<div><span style="white-space:pre"> </span>MarketDataRequest.NoRelatedSym
instruments = new MarketDataRequest.NoRelatedSym();</div>
<div><span style="white-space:pre"> </span>instruments.set(new
Symbol(currencyPair));</div>
<div><span style="white-space:pre"> </span>mdr.addGroup(instruments);</div>
<div><br>
</div>
<div><span style="white-space:pre"> </span>// Specify that
we'll want the bids and asks</div>
<div><span style="white-space:pre"> </span>mdr.setField(new
NoMDEntryTypes(2));<span style="white-space:pre"> </span></div>
<div><span style="white-space:pre"> </span>MarketDataRequest.NoMDEntryTypes
group = new MarketDataRequest.NoMDEntryTypes();</div>
<div><span style="white-space:pre"> </span>group.set(new
MDEntryType(MDEntryType.BID));</div>
<div><span style="white-space:pre"> </span>group.set(new
MDEntryType(MDEntryType.OFFER));</div>
<div><span style="white-space:pre"> </span>mdr.addGroup(group);</div>
<div><br>
</div>
<div><span style="white-space:pre"> </span>boolean
fromMarket = Session.sendToTarget(mdr, sessionId);</div>
<div><span style="white-space:pre"> </span>System.out.println("market
request status--->"+fromMarket);</div>
<div><span style="white-space:pre"> </span>}</div>
</div>
<div><br>
</div>
<div>/////</div>
<div>the request is success. after that which cal back method i
need to check and how to parse that Code for getting Symbol
prize.</div>
</div>
<!--'"--><br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! <a class="moz-txt-link-freetext" href="http://sdm.link/slashdot">http://sdm.link/slashdot</a></pre>
<!--'"--><br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Quickfixj-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Qui...@li...">Qui...@li...</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/quickfixj-users">https://lists.sourceforge.net/lists/listinfo/quickfixj-users</a>
</pre>
</blockquote>
<br>
</body>
</html>
|