I'm developing a basic trading platform with a Buy/Sell button and a Bid/Ask display.
I'm sending a MarketDataRequest successfully -> get a MassQuote response -> Sending a MassQuoteAcknowledgement back and getting the updates.
I just can't figure out how to get the prices out of the response using QuickFixn
Example Response below
8=FIX.4.4|9=132|35=i|34=6|49=XXXXXXX|52=20160517-22:38:56.159|56=XXXXXXXXX|117=4|296=1|302=AP2|295=1|299=0|188=1.97471|190=1.97506|10=053|
I see the prices there, but I can't figure out how to extract that in my c# app.
public void HandleMassQuote(QuickFix.FIX44.MassQuote msg)
{
try
{
// Acknowledgement sending code removed
if (msg.IsSetField(new QuickFix.Fields.BidSpotRate()))
{
BuyPrice = msg.GetField(new QuickFix.Fields.BidSpotRate()).ToString();
Trace.WriteLine("Bid Rate: " + BuyPrice);
}
if (msg.IsSetField(new QuickFix.Fields.OfferSpotRate()))
{
SellPrice = msg.GetField(new QuickFix.Fields.OfferSpotRate()).ToString();
Trace.WriteLine("Offer Rate: " + SellPrice);
}
}
catch (Exception e)
{
Trace.WriteLine(e.ToString());
}
}
Has anyone had experience with this that can point me in the right direction? I'm assuming I'm missing something so obvious but it hasn't dawned on my yet