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?

1
  • Which variant do you use? For C++ or Java? You tagged "quickfixj" but write QuickFIX (which is C++). If QuickFIX/J, which version exactly? Commented Jun 9, 2021 at 13:39

1 Answer 1

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.)

Sign up to request clarification or add additional context in comments.

2 Comments

Maybe the idea for the config comes from here: stackoverflow.com/a/62445873/4962355 :) But only working in QFJ.
Ha, interesting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.