{{Quickfixn}} get prices

Walter Robert Ditzler ditwal001 at gmail.com
Sun Mar 10 18:48:57 PDT 2013


Hi Mike,

Hi Grant,

 

sure both inputs helped me, but actually the „group“ was the saving hint! Of
course prices comes in within a group, just didn’t know how to bundle the
group. Now things are getting very clear. Bellow I pasted my solution
reading HotspotFX quotes, all working fine!

 

Thanks a lot for helping,

 

Walter.

 

***

public void OnMessage(QuickFix.FIX42.MarketDataSnapshotFullRefresh message,
QuickFix.SessionID sessionID)

{

String
_CcyCcy
= String.Empty;

                NoMDEntries
_NoMDEntries
= null;

                Quote
_Quote
= null;

 

                try

                {

                                Trace.WriteLine("OnMessage
MarketDataSnapshotFullRefresh\n\n" + message.ToString(),"abbeoo");

                               _CcyCcy
= message.Get(new Symbol()).getValue();

                                _NoMDEntries
= message.Get(new NoMDEntries());

                               var _Group
= new MarketDataSnapshotFullRefresh.NoMDEntriesGroup();

                                _Quote
= new Quote();

                                _Quote.CcyCcy
= _CcyCcy;

                                _Quote.Ticks
= message.Header.GetDateTime(52).Ticks;

 

for(Int32 i=1; i<_NoMDEntries.getValue()+1; i++)

                               {

                                               message.GetGroup(i,_Group);

 

                                               switch(_Group.Get(new
MDEntryType()).ToString())

                                               {

                                                               case "0":

 
_Quote.Bid                        = _Group.Get(new MDEntryPx()).getValue();

 
_Quote.BidSize                               = _Group.Get(new
MDEntrySize()).getValue();

 
break;

                                                               case "1":

 
_Quote.Ask                       = _Group.Get(new MDEntryPx()).getValue();

 
_Quote.AskSize                              = _Group.Get(new
MDEntrySize()).getValue();

 
break;

                                                               default:

 
break;

                                               }

                                }

 

                                Console.WriteLine(_Quote.Spread.ToString());

 

if(OnQuoteEvent != null)

                                               OnQuoteEvent(_Quote);

                }

                catch(System.Exception ex)

                {

                                Trace.WriteLine("OnMessage
MarketDataSnapshotFullRefresh error\n\n" + ex.ToString(),"abbeoo");

}

                finally

                {

                                _NoMDEntries
= null;

                                _Quote
= null;

                }

}

***

 

 

From: quickfixn-bounces at lists.quickfixn.com
[mailto:quickfixn-bounces at lists.quickfixn.com] On Behalf Of Mike Gatny
Sent: Freitag, 8. März 2013 23:05
To: Mailing list for QuickFIX/n
Subject: Re: {{Quickfixn}} get prices

 

This is really more of a FIX protocol question than a QF question.
MarketDataSnapshotFullRefresh isn't going to have one bid price at the root
level of the message.   It will have one or more MDEntryPx (tag 270) fields
within the NoMDEntries repeating group.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20130311/5d0b17f9/attachment-0002.htm>


More information about the Quickfixn mailing list