1

I need to send tag 58=something in 35=A (logon message) in FIX4.4. How should I configure .cfg file of QuickFIX tool to have this tag sent by the tool?

Christoph John
  • 3,003
  • 2
  • 13
  • 23
  • Which variant do you use? For C++ or Java? You tagged "quickfixj" but write QuickFIX (which is C++). If QuickFIX/J, which version exactly? – Christoph John Jun 09 '21 at 13:39

1 Answers1

3

You wouldn't use the config file for that. (Not sure where you got that idea.)

Logon is an admin message, so you would do it in the toAdmin() callback. This callback handles all admin messages, though, so you need to write a check to make sure you only add it to Logon.

You could put this code in toAdmin():

final String msgType = msg.getHeader().getString(MsgType.FIELD);
if(MsgType.LOGON.compareTo(msgType) == 0)
{
    // "Text" is the name of field 58
    // That constant literally resolves to int 58.
    msg.setString(quickfix.fields.Text.FIELD, "razzledazzle");
}

(I'm assuming QF/j, but the code would be similar for any QF.)

TT.
  • 15,774
  • 6
  • 47
  • 88
Grant Birchmeier
  • 17,809
  • 11
  • 63
  • 98