[Quickfix-developers] sendToTarget Format
Brought to you by:
orenmnero
From: Parjeet S. <par...@oa...> - 2008-03-13 06:34:44
|
This is a simple question but I need bit of clarifications: I am not sure few scenarios. I have coded to SendMessage in this way: Private Function SendMessageRequest(ByVal intQuoteReqID As Integer) As Boolean strQuoteReqID = CStr(intQuoteReqID) message.setField(New StringField(40, "C")) message.setField(New StringField(167, "FOR")) message.setField(New StringField(131, strQuoteReqID)) message.setField(New StringField(146, "1")) message.setField(New StringField(55, "AUD/USD")) Try Session.sendToTarget(message, "OAKVALE-PRICES-TEST", "BARX-PRICES-TEST") Catch e As SessionNotFound MsgBox(e.Message) End Try At the moment I am hard coding that is the Tag and Description. message.setField (New StringField (40,"C")) - Is there any way I can avoid hard coding and use data dictionary for ordType Tag and description etc. - At the moment I am calling above code from onLogon..........is this correct place to call above function or I have to use toApp call back Public Sub onLogon(ByVal Param As QuickFix.SessionID) Implements QuickFix.Application.onLogon System.Console.WriteLine("Logon: " & Param.GetType.FullName) Dim s As Session = Session.lookupSession(Param) If (s.isLoggedOn = True) Then If (s.receivedLogon = True) Then intQuoteReqID = intQuoteReqID + 1 SendMessageRequest(intQuoteReqID) End If End If |