Re: [Quickfix-users] Receiving market data
Brought to you by:
orenmnero
From: <or...@qu...> - 2008-04-29 13:16:21
|
<html><body>I think the section on reading message with repeating groups will help you out a lot. Bottom of the page: <a href="http://www.quickfixengine.org/quickfix/doc/html/repeating_groups.html">http://www.quickfixengine.org/quickfix/doc/html/repeating_groups.html</a><br><br>OnNewQuote is not a quickfix method, you'll need to ask SmartQuant about that.<br><br>--oren<br><br> <blockquote webmail="1" style="border-left: 2px solid blue; margin-left: 8px; padding-left: 8px;"> -------- Original Message --------<br> Subject: Re: [Quickfix-users] Receiving market data<br> From: "Claes_Gyllenswärd" <let...@gm...><br> Date: Tue, April 29, 2008 6:01 am<br> To: <br> Cc: <a href="mailto:qui...@li...">qui...@li...</a><br> <br> QuickFIX Documentation: <a href="http://www.quickfixengine.org/quickfix/doc/html/index.html" target="_blank"><a href="http://www.quickfixengine.org/quickfix/doc/html/index.html">http://www.quickfixengine.org/quickfix/doc/html/index.html</a></a><br> QuickFIX Support: <a href="http://www.quickfixengine.org/services.html" target="_blank"><a href="http://www.quickfixengine.org/services.html">http://www.quickfixengine.org/services.html</a></a><br> <br> <hr>As I should have done from the very beginning, I read the documentation.<br>My interpretation of the C# example code under "Receiving messages" is to change the code to:<br><br>case MDEntryType.BID: {<br> BidPx BID = new BidPx();<br> double somebid = message.get(BID);<br>}<br><br>But the message.get doesn't accept a BidPX, instead it wants a MDReqID. <br>Because I didn't know what to do, I tried<br>message.get(new MDReqID());<br>But then I had a MDReqID returned aswell, which isn't what I want.<br> <br>I feel like I'm so close to understanding what's happening, but I can't figure it out.<br><br><div class="gmail_quote">2008/4/29 Claes Gyllenswärd <<a href="mailto:let...@gm..." onclick="Popup.composeWindow('pcompose.php?sendto=letharion%40gmail.com');; return false;" target="_blank"><a href="mailto:let...@gm...">let...@gm...</a></a>>:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> Ok, two values in a single instance is not supported. And yes, I do see a BID and OFFER type.<br>What gets me confused then is that there is a function called OnNewQuote, that takes both bid and ask as argument.<br>Some googling tells me this function seems to be unique to OpenQuant, and isn't really related to QuickFIX, is that correct?<br> <br>case MDEntryType.BID: {<br> bid = message.getDouble(270);<br> Console.WriteLine("Got Bid" + bid);<br>}<br><br>For some reason the case stops executing after bid = message.getDouble(270);<br> If I do<br><br>case MDEntryType.BID: {<br> Console.WriteLine("Got Bid" + bid);<br> Console.WriteLine("Got Bid" + bid);<br> bid = message.getDouble(270);<br> Console.WriteLine("Got Bid" + bid);<br> break;<br>}<br><br>WriteLine executes twice, but no more.<br>Is my syntax with the getDouble completly wrong?<br><br><div class="gmail_quote">2008/4/28 <<a href="mailto:or...@qu..." onclick="Popup.composeWindow('pcompose.php?sendto=oren%40quickfixengine.org');; return false;" target="_blank"><a href="mailto:or...@qu...">or...@qu...</a></a>>:<div> <div></div><div><br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div>There is no QUOTE type for MDEntryType. That would imply having two values in a single instance of a group, which is not supported. There are BID and OFFER types, which this message is actually providing you.<br> </div> <div>Your bid is</div><div> <div>269=0 270=487.5 271=10000 <br></div> </div><div>And you your offer is</div><div> <div>269=1 270=488.5 271=10000</div> <div> </div> </div><div>269 is the MDEntryType. 0 is a BID, 1 is an OFFER, and 2 is a TRADE.</div><div><div></div><div> <blockquote style="border-left: 2px solid blue; padding-left: 8px; margin-left: 8px;">-------- Original Message --------<br>Subject: [Quickfix-users] Receiving market data<br>From: "Claes_Gyllenswärd" <<a href="mailto:let...@gm..." onclick="Popup.composeWindow('pcompose.php?sendto=letharion%40gmail.com');; return false;" target="_blank"><a href="mailto:let...@gm...">let...@gm...</a></a>><br> Date: Mon, April 28, 2008 10:49 am<br>To: <a href="mailto:qui...@li..." onclick="Popup.composeWindow('pcompose.php?sendto=quickfix-users%40lists.sourceforge.net');; return false;" target="_blank"><a href="mailto:qui...@li...">qui...@li...</a></a><br><br>QuickFIX Documentation: <a href="http://www.quickfixengine.org/quickfix/doc/html/index.html" target="_blank"></a><a href="http://www.quickfixengine.org/quickfix/doc/html/index.html" target="_blank"><a href="http://www.quickfixengine.org/quickfix/doc/html/index.html">http://www.quickfixengine.org/quickfix/doc/html/index.html</a></a><br> QuickFIX Support: <a href="http://www.quickfixengine.org/services.html" target="_blank"></a><a href="http://www.quickfixengine.org/services.html" target="_blank"><a href="http://www.quickfixengine.org/services.html">http://www.quickfixengine.org/services.html</a></a><br><br> <hr> Having succesfully connected, and sent some dummy buy/sell/cancel/limit-orders and seen that everything works, I tried getting marketdata.<br>I see in the log that I receive for example:<br>"268=2 269=0 270=487.5 271=10000 269=1 270=488.5 271=10000", so I do get data from my provider.<br> But OpenQuant, that I use, doesn't seem to recognize this. It does collect trade, but not quote data.<br>Before I go complaining to the developers, I figured I'd try to work out how QuickFix handles the data.<br> <br> I find:<br>case MDEntryType.TRADE: {<br> provider.OnNewTrade(<br> record.Instrument,<br> group.getMDEntryPx().getValue(),<br> (int)group.getMDEntrySize().getValue());<br> }<br><br>And an equivalent function "OnNewQuote()", so I tried just adding<br> case MDEntryType.QUOTE: {<br> <br>But there is no quote in MDEntryType. I can find no other place that calls<br>OnNewQuote().<br><br>I would greatly appreciate any hints as to what I'm missing :)<br> <hr> -------------------------------------------------------------------------<br>This <a href="http://SF.net" target="_blank">SF.net</a> email is sponsored by the 2008 JavaOne(SM) Conference <br>Don't miss this year's exciting event. There's still time to save $100. <br> Use priority code J8TL2D2. <br><a href="http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone" target="_blank"></a><a href="http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone" target="_blank"><a href="http://ad.doubleclick.net/clk;198757673;13503038;p?">http://ad.doubleclick.net/clk;198757673;13503038;p?</a></a><a href="http://java.sun.com/javaone" target="_blank"><a href="http://java.sun.com/javaone">http://java.sun.com/javaone</a></a> <hr> _______________________________________________<br>Quickfix-users mailing list<br><a href="http://email.secureserver.net/pcompose.php#11999961c072a4d3_1199977e3c013516_1199663be6cfe008_Compose" target="_self">Quickfix-users<b></b>@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/quickfix-users" target="_blank"></a><a href="https://lists.sourceforge.net/lists/listinfo/quickfix-users" target="_blank"><a href="https://lists.sourceforge.net/lists/listinfo/quickfix-users">https://lists.sourceforge.net/lists/listinfo/quickfix-users</a></a><br> </blockquote></div></div></div> </blockquote></div></div></div><br> </blockquote></div><br> <hr>-------------------------------------------------------------------------<br> This <a href="http://SF.net">SF.net</a> email is sponsored by the 2008 JavaOne(SM) Conference <br> Don't miss this year's exciting event. There's still time to save $100. <br> Use priority code J8TL2D2. <br> <a href="http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone" target="_blank"><a href="http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone">http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone</a></a><hr>_______________________________________________<br> Quickfix-users mailing list<br> <a href="http://email.secureserver.net/pcompose.php#Compose" onclick="Popup.composeWindow('pcompose.php?sendto=Quickfix-users%40lists.sourceforge.net'); return false;">Quickfix-users<b></b>@lists.sourceforge.net</a><br> <a href="https://lists.sourceforge.net/lists/listinfo/quickfix-users" target="_blank"><a href="https://lists.sourceforge.net/lists/listinfo/quickfix-users">https://lists.sourceforge.net/lists/listinfo/quickfix-users</a></a><br> </blockquote></body></html> |