Re: [Quickfix-users] Receiving market data
Brought to you by:
orenmnero
From: C. G. <let...@gm...> - 2008-04-29 11:01:09
|
As I should have done from the very beginning, I read the documentation. My interpretation of the C# example code under "Receiving messages" is to change the code to: case MDEntryType.BID: { BidPx BID = new BidPx(); double somebid = message.get(BID); } But the message.get doesn't accept a BidPX, instead it wants a MDReqID. Because I didn't know what to do, I tried message.get(new MDReqID()); But then I had a MDReqID returned aswell, which isn't what I want. I feel like I'm so close to understanding what's happening, but I can't figure it out. 2008/4/29 Claes Gyllenswärd <let...@gm...>: > Ok, two values in a single instance is not supported. And yes, I do see a > BID and OFFER type. > What gets me confused then is that there is a function called OnNewQuote, > that takes both bid and ask as argument. > Some googling tells me this function seems to be unique to OpenQuant, and > isn't really related to QuickFIX, is that correct? > > case MDEntryType.BID: { > bid = message.getDouble(270); > Console.WriteLine("Got Bid" + bid); > } > > For some reason the case stops executing after bid = > message.getDouble(270); > If I do > > case MDEntryType.BID: { > Console.WriteLine("Got Bid" + bid); > Console.WriteLine("Got Bid" + bid); > bid = message.getDouble(270); > Console.WriteLine("Got Bid" + bid); > break; > } > > WriteLine executes twice, but no more. > Is my syntax with the getDouble completly wrong? > > 2008/4/28 <or...@qu...>: > > 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. > > Your bid is > > 269=0 270=487.5 271=10000 > > And you your offer is > > 269=1 270=488.5 271=10000 > > > > 269 is the MDEntryType. 0 is a BID, 1 is an OFFER, and 2 is a TRADE. > > > > -------- Original Message -------- > > Subject: [Quickfix-users] Receiving market data > > From: "Claes_Gyllenswärd" <let...@gm...> > > Date: Mon, April 28, 2008 10:49 am > > To: qui...@li... > > > > QuickFIX Documentation: > > <http://www.quickfixengine.org/quickfix/doc/html/index.html> > > http://www.quickfixengine.org/quickfix/doc/html/index.html > > QuickFIX Support: <http://www.quickfixengine.org/services.html> > > http://www.quickfixengine.org/services.html > > > > ------------------------------ > > Having succesfully connected, and sent some dummy > > buy/sell/cancel/limit-orders and seen that everything works, I tried getting > > marketdata. > > I see in the log that I receive for example: > > "268=2 269=0 270=487.5 271=10000 269=1 270=488.5 271=10000", so I do get > > data from my provider. > > But OpenQuant, that I use, doesn't seem to recognize this. It does > > collect trade, but not quote data. > > Before I go complaining to the developers, I figured I'd try to work out > > how QuickFix handles the data. > > > > I find: > > case MDEntryType.TRADE: { > > provider.OnNewTrade( > > record.Instrument, > > > > group.getMDEntryPx().getValue(), > > > > (int)group.getMDEntrySize().getValue()); > > } > > > > And an equivalent function "OnNewQuote()", so I tried just adding > > case MDEntryType.QUOTE: { > > > > But there is no quote in MDEntryType. I can find no other place that > > calls > > OnNewQuote(). > > > > I would greatly appreciate any hints as to what I'm missing :) > > ------------------------------ > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference > > Don't miss this year's exciting event. There's still time to save $100. > > Use priority code J8TL2D2. > > > > <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 > > ------------------------------ > > _______________________________________________ > > Quickfix-users mailing list > > Quickfix-users**@lists.sourceforge.net<#11999961c072a4d3_1199977e3c013516_1199663be6cfe008_Compose> > > <https://lists.sourceforge.net/lists/listinfo/quickfix-users> > > https://lists.sourceforge.net/lists/listinfo/quickfix-users > > > > > |